on ‎2018 Jul 13 2:24 PM
Hi everyone,
I want to set default Values for currency and unit in price row as i create a new price row. i dont want to choose everytime the currency because the currency is always Euro. How can i do that? should i change the any xml file, or i need to implement it.?
Thanks in advance
Request clarification before answering.
Hi Adil,
You can achieve it by extending those types in yourextension-items.xml. Just add <defaultvalue> for the desired attributes (see items.xml reference article).
For Currency it would be something like (Currency documentation😞
<attribute generate="true" autocreate="true" qualifier="currency" type="Currency">
<defaultvalue>
new de.hybris.order.calculation.money.Currency(yourDesiredCurrencyIsocode, digits)
</defaultvalue>
<persistence type="property" qualifier=""/>
<modifiers read="true" write="true" search="true" encrypted="false" optional="false" removable="false" initial="true" unique="false" private="false" partof="false"/>
</attribute>
For Unit (javadoc😞
<attribute generate="true" autocreate="true" qualifier="unit" type="Unit">
<defaultvalue>
new de.hybris.platform.jalo.product.Unit()
</defaultvalue>
<persistence type="property" qualifier=""/>
<modifiers read="true" write="true" search="true" encrypted="false" optional="false" removable="false" initial="true" unique="false" private="false" partof="false"/>
</attribute>
For Unit you might need to use unitService (javadoc, most likely getUnitForCode()) instead of the constructor.
Hope this helps.
Best Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could probably overwrite Configurable Flow Wizard Widget for the PriceRow type to implement it via Backoffice.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.