thousandmonkeys / m2-flatcategories-module
为 Magento2 提供的平面分类 REST 端点,以绕过默认树形接口的愚蠢。
v1.0.1
2018-04-08 19:42 UTC
This package is not auto-updated.
Last update: 2024-09-24 17:00:59 UTC
README
为 Magento2 提供的平面分类 REST 端点,以绕过默认树形接口的愚蠢。这仅仅提供了一个所有类别的列表,并支持搜索条件,使得缓存和查找变得简单,而不是困难且令人烦恼。
安装
- composer require thousandmonkeys/m2-flatcategories-module
- php bin/magento deploy:mode:set developer
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento deploy:mode:set production
- php bin/magento maintenance:disable
使用方法
GET rest/V1/flatCategories?searchCriteria 响应
{
"items": [
{
"id": 0,
"parent_id": 0,
"name": "string",
"is_active": true,
"position": 0,
"level": 0,
"children": "string",
"created_at": "string",
"updated_at": "string",
"path": "string",
"available_sort_by": [
"string"
],
"include_in_menu": true,
"extension_attributes": {},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
}
],
"search_criteria": {
"filter_groups": [
{
"filters": [
{
"field": "string",
"value": "string",
"condition_type": "string"
}
]
}
],
"sort_orders": [
{
"field": "string",
"direction": "string"
}
],
"page_size": 0,
"current_page": 0
},
"total_count": 0
}