attributes form wip
This commit is contained in:
@@ -161,13 +161,10 @@ class ProductCategoriesController extends AppController
|
||||
'product_catalog_id' => $this->request->getQuery('product_catalog_id', -1),
|
||||
],
|
||||
]);
|
||||
$form = $this->request->getQuery('form', 'product_category');
|
||||
if ($form === 'product') {
|
||||
$productCategoriesQ = $productCategoriesTable
|
||||
->find('treeList', keyPath: 'internal_id', valuePath: 'name');
|
||||
} else {
|
||||
$productCategoriesQ = $productCategoriesTable->find('treeList');
|
||||
}
|
||||
$productCategoriesQ = $this->request->getQuery('form', 'product_category') === 'product' ?
|
||||
$productCategoriesTable->find('treeList', keyPath: 'internal_id', valuePath: 'name') :
|
||||
$productCategoriesTable->find('treeList');
|
||||
|
||||
$productCategories = $productCategoriesQ
|
||||
->orderBy(['ProductCategories.name'])
|
||||
->toArray();
|
||||
|
||||
Reference in New Issue
Block a user