wip
This commit is contained in:
@@ -161,9 +161,14 @@ class ProductCategoriesController extends AppController
|
||||
'product_catalog_id' => $this->request->getQuery('product_catalog_id', -1),
|
||||
],
|
||||
]);
|
||||
$productCategories = $productCategoriesTable
|
||||
->find('treeList')
|
||||
// ->where(['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: 'name', valuePath: 'internal_id');
|
||||
} else {
|
||||
$productCategoriesQ = $productCategoriesTable->find('treeList');
|
||||
}
|
||||
$productCategories = $productCategoriesQ
|
||||
->orderBy(['ProductCategories.name'])
|
||||
->toArray();
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@ class ProductCategoryAttributesController extends AppController
|
||||
return $this->redirect(['action' => 'index']);
|
||||
}
|
||||
|
||||
public function form($categoryId = null)
|
||||
public function form()
|
||||
{
|
||||
$productCategoryAttributes = $this->getTable()->getAllCategoryAttributesForCategoryId($categoryId);
|
||||
$productCategoryAttributes = $this->getTable()->getAllCategoryAttributesForCategoryId($this->request->getQuery('product_category_id', '-1'));
|
||||
|
||||
$this->set(compact('productCategoryAttributes'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user