This commit is contained in:
2025-04-01 01:00:09 -07:00
parent fad4f575b8
commit 17de2e97dd
8 changed files with 69 additions and 14 deletions

View File

@@ -110,4 +110,12 @@ class ProductCategoryAttributesTable extends Table
return $rules;
}
public function getAllCategoryAttributesForCategoryId(string $internalCategoryId)
{
$category = $this->ProductCategories->find()->where(['internal_id' => $internalCategoryId])->firstOrFail();
$categories = $this->ProductCategories->find('path', for: $category->id)->all();
return $categories;
}
}