title | issue |
---|---|
Add a new Order total amount rule to Rule Builder |
NEXT-14949 |
- Added migration
Migration1624202045AddValueOfOrdersToCustomerTable
to add a columnorder_total_amount
tocustomer
table and update this column for old customers. - Added new property
orderTotalAmount
in classShopware\Core\Checkout\Customer\CustomerEntity
which used to define a total amount of all orders of customer. - Added new
OrderTotalAmountRule
inShopware\Core\Checkout\Customer\Rule
- Add new function
deleteOrder
in classShopware\Core\Checkout\Customer\Subscriber\CustomerMetaFieldSubscriber
to updateorder_total_amount
of customer when order is deleted. - Changed function
fillCustomerMetaDataFields
in classShopware\Core\Checkout\Customer\Subscriber\CustomerMetaFieldSubscriber
to rewrite this function with using plain sql and updateorderTotalAmount
when customer create/update a new order. - Changed class
Shopware\Core\Framework\Demodata\Generator\OrderGenerator
to allow faster order generation
- Added new component
sw-condition-order-total-amount
in/src/app/component/rule/condition-type
- Added new rule condition
customerOrderTotalAmount
in/src/app/decorator/condition-type-data-provider.decorator.js