wip
This commit is contained in:
@@ -45,6 +45,6 @@ class ProductSku extends Entity
|
||||
|
||||
// entities
|
||||
'product' => false,
|
||||
'product_sku_variant_values' => false,
|
||||
'product_sku_variant_values' => true,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -101,8 +101,10 @@ class ProductSkuVariantValuesTable extends Table
|
||||
public function buildRules(RulesChecker $rules): RulesChecker
|
||||
{
|
||||
$rules->add($rules->existsIn(['product_sku_id'], 'ProductSkus'), ['errorField' => 'product_sku_id']);
|
||||
$rules->add($rules->existsIn(['product_category_variant_id'], 'ProductCategoryVariants'), ['errorField' => 'product_category_variant_id']);
|
||||
$rules->add($rules->existsIn(['product_category_variant_option_id'], 'ProductCategoryVariantOptions'), ['errorField' => 'product_category_variant_option_id']);
|
||||
|
||||
// @TODO why not working?? causing tests to fail / associated variant values not saving on product-skus/add
|
||||
// $rules->add($rules->existsIn(['product_category_variant_id'], 'ProductCategoryVariants'), ['errorField' => 'product_category_variant_id']);
|
||||
// $rules->add($rules->existsIn(['product_category_variant_option_id'], 'ProductCategoryVariantOptions'), ['errorField' => 'product_category_variant_option_id']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user