Order subTotalPrice field
With this release, a checkout client can now post the subtotal value of the order using the subTotalPrice
field. This will eliminate the need to recalculate this value before it is served by the Order service when a user wants to read the details of the order, such as seeing the details of a placed order in the Builder UI or receiving the order details in a confirmation email. This will ensure that there is no room for any calculation inconsistencies.
The latest order schema is available here: order.json %>/hybris/order/v1/meta-data/schema/order.json)
Mixins in customer attributes
With this release, a merchant/checkout application can create an order with mixins in customer objects. The schema of a mixin should be specified in the metadata attribute.
For example:
"metadata": {
"mixins": {
"secondaryContactPhone": "<%- @partial('proxy_url') %>/hybris/schema/v1/kiwistest/contact-number.json"
}
},
"mixins": {
"secondaryContactPhone": {
"number": "+86 334 0033 9934"
}
}
To make use of this data in your order confirmation email templates, refer to the following example and modify it to your needs according to mixin contents:
#if($!{d.order.customer.mixins} && $!{d.order.customer.mixins.secondaryContactPhone})
#e($!{d.order.customer.mixins.secondaryContactPhone.number})
#end
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.