diff --git a/src/Model/Table/ProductCategoryAttributeOptionsTable.php b/src/Model/Table/ProductCategoryAttributeOptionsTable.php index 6e4b0e9..6244718 100644 --- a/src/Model/Table/ProductCategoryAttributeOptionsTable.php +++ b/src/Model/Table/ProductCategoryAttributeOptionsTable.php @@ -65,7 +65,7 @@ class ProductCategoryAttributeOptionsTable extends Table public function validationDefault(Validator $validator): Validator { $validator - ->integer('product_category_attribute_id') + ->uuid('product_category_attribute_id') ->notEmptyString('product_category_attribute_id'); $validator @@ -96,7 +96,7 @@ class ProductCategoryAttributeOptionsTable extends Table */ public function buildRules(RulesChecker $rules): RulesChecker { - $rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => '0']); + $rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => 'product_category_attribute_id']); return $rules; } diff --git a/templates/ProductCategories/view.php b/templates/ProductCategories/view.php index e2c4669..4bcd11d 100644 --- a/templates/ProductCategories/view.php +++ b/templates/ProductCategories/view.php @@ -75,16 +75,12 @@ <table> <tr> <th><?= __('Name') ?></th> - <th><?= __('Options') ?></th> <th><?= __('Enabled') ?></th> <th class="actions"><?= __('Actions') ?></th> </tr> <?php foreach ($productCategory->product_category_attributes as $productCategoryAttribute) : ?> <tr> <td><?= h($productCategoryAttribute->name) ?></td> - <td> - options - </td> <td><?= h($productCategoryAttribute->enabled) ?></td> <td class="actions"> <?= $this->Html->link(__('View'), ['controller' => 'ProductCategoryAttributes', 'action' => 'view', $productCategoryAttribute->id]) ?>