mediaman/module-product-category-sort-order

此包已被放弃,不再维护。未建议替代包。

Magento 2 模块,提供分类位置的排序功能

1.0.2 2017-06-19 08:47 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:50:20 UTC


README

提供分类位置的排序功能。

默认的 Magento2 /rest/V1/products REST API 端点不允许按产品分类位置排序。本模块通过无缝集成到 Magento2 API 来解决此问题。

Build Status

入门

通过 composer 安装模块

$ composer require "mediaman/module-product-category-sort-order: 1.*"

启用模块

$ ./bin/magento module:enable Mediaman_ProductCategorySortOrder

升级您的 Magento 数据库模式

$ ./bin/magento setup:upgrade

使用方法

您可以像平常一样使用 /rest/V1/products 端点

$ curl -X GET http://magento.example.com/rest/V1/products?
searchCriteria[filterGroups][0][filters][extension_attributes][field]=category_id&
searchCriteria[filterGroups][0][filters][extension_attributes][value]=42&
searchCriteria[filterGroups][0][filters][extension_attributes][conditionType]=eq&
searchCriteria[sortOrders][0][field]=position&
searchCriteria[sortOrders][0][direction]=ASC 
--header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"

许可协议

MIT © mediaman GmbH