VolumePrices transformer¶
Prepares volume prices for storing it in spy_price_product_store.price_data
column:
JSON-decodes data inside
fromField
Encodes it in a new JSON inside of the
volume_prices
keyStores it to the
toField
.
Source data:
[{"quantity":5,"net_price":400,"gross_price":480},{"quantity":10,"net_price":350,"gross_price":420},{"quantity":20,"net_price":250,"gross_price":300}]
Usage:
<volume-prices from="price_data.volume_prices" to="prices.priceData"/>
Target data:
{"volume_prices":[{"quantity":5,"net_price":400,"gross_price":480},{"quantity":10,"net_price":350,"gross_price":420},{"quantity":20,"net_price":250,"gross_price":300}]}
Attributes:
from
- name of the field to get volume prices (JSON)to
- name of the field to set price data (JSON)