Description
Add service in Magento Backoffice to retrieve all prices related data for initial sync data
AC:
- raw prices of simple products should be returned (without relying on the existing price indexer)
- special price, special price date
- tier prices
- custom options prices
- product links prices. (downloadable)
- product/options relations
- for composite products
- for custom options
repo: <https://github.com/magento/commerce-data-export]
Tech details:
- list of all price-related events Price change notification #443 (comment) (only part of them should be honored for synchronization)
- utilize the same approach (data providers) for raw price collecting data which used in Price change notification #443
- refactor message structure if needed to have similar response for price change event and synchronisation response
- "id" field in Request/Response object is a string that represents a specific entity, e.g.
- Introduce Interface to build product id (refactor existing providers, e.g. Magento\CatalogDataExporter\Model\Provider\Product\ProductOptions\OptionValueUid)
- for product: regular Magento Product ID returned, e.g. "42"
- for custom option: "option/<customoption_id]/[custom_option_valueid]"
- use batching for return prices (generators usage is preferred)
Proposed response
{
"prices":[
{
"meta":{
"code":"price",
"w":0,
"cg":1
},
"data": [
{
"id":"71",
"value":"12.0"
},
// ...
]
},
{
"meta":{
"code":"tier_price",
"w":0,
"cg":1
},
"data": [
{
"id":"71",
"value":"12.0",
"qty": 2
}
]
}
>
}