wip
	
		
			
	
		
	
	
		
			
				
	
				CI / testsuite (mysql, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (mysql, 8.4, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (pgsql, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (pgsql, 8.4, ) (push) Failing after 1s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.1, prefer-lowest) (push) Failing after 1s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.4, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / Coding Standard & Static Analysis (push) Failing after 0s
				
					Details
				
			
		
	
				
					
				
			
				
	
				CI / testsuite (mysql, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (mysql, 8.4, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (pgsql, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (pgsql, 8.4, ) (push) Failing after 1s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.1, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.1, prefer-lowest) (push) Failing after 1s
				
					Details
				
			
		
			
				
	
				CI / testsuite (sqlite, 8.4, ) (push) Failing after 0s
				
					Details
				
			
		
			
				
	
				CI / Coding Standard & Static Analysis (push) Failing after 0s
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									f724b86674
								
							
						
					
					
						commit
						56e526bc0f
					
				|  | @ -161,9 +161,14 @@ class ProductCategoriesController extends AppController | ||||||
|                 'product_catalog_id' => $this->request->getQuery('product_catalog_id', -1), |                 'product_catalog_id' => $this->request->getQuery('product_catalog_id', -1), | ||||||
|             ], |             ], | ||||||
|         ]); |         ]); | ||||||
|         $productCategories = $productCategoriesTable |         $form = $this->request->getQuery('form', 'product_category'); | ||||||
|             ->find('treeList') |         if ($form === 'product') { | ||||||
| //            ->where(['product_catalog_id' => $this->request->getQuery('product_catalog_id', -1)])
 |             $productCategoriesQ = $productCategoriesTable | ||||||
|  |                 ->find('treeList', keyPath: 'name', valuePath: 'internal_id'); | ||||||
|  |         } else { | ||||||
|  |             $productCategoriesQ = $productCategoriesTable->find('treeList'); | ||||||
|  |         } | ||||||
|  |         $productCategories = $productCategoriesQ | ||||||
|             ->orderBy(['ProductCategories.name']) |             ->orderBy(['ProductCategories.name']) | ||||||
|             ->toArray(); |             ->toArray(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -167,9 +167,9 @@ class ProductCategoryAttributesController extends AppController | ||||||
|         return $this->redirect(['action' => 'index']); |         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')); |         $this->set(compact('productCategoryAttributes')); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -10,6 +10,7 @@ | ||||||
| <h4 class="mb-4">Basic Info</h4> | <h4 class="mb-4">Basic Info</h4> | ||||||
| 
 | 
 | ||||||
| <?php | <?php | ||||||
|  | echo $this->Form->hidden('form', ['value' => 'product']); | ||||||
| echo $this->Form->control('name'); | echo $this->Form->control('name'); | ||||||
| echo $this->Form->control('product_catalog_id', [ | echo $this->Form->control('product_catalog_id', [ | ||||||
|         'empty' => 'Select a Catalog', |         'empty' => 'Select a Catalog', | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue