I've put logic inside of the OPAY basket item that attempts to change the calculated shipping charge for a specific shipping method
in order to complement the functionality in the weight based shipping method. What I've tried unsuccessfully is as follows:
Just preceding the existing Order Charge foreach loop i've put an additional loop:
<mvt:foreach iterator="charge" array="basket:charges">
<mvt:item name="ry_toolbelt" param="assign|g.charge_cnt|g.charge_cnt + 1" />
<mvt:if expr="charge:descrip EQ 'whatever') ">
<mvt:item name="ry_toolbelt" param="assign|l.all_settings:basket:charges[g.charge_cnt]:disp_amt|99.90" />
<mvt:item name="ry_toolbelt" param="assign|l.all_settings:basket:charges[g.charge_cnt]:formatted_disp_amt|'$99.90'" />
</mvt:if>
</mvt:foreach>
When I look at the variable values using the toolbelt, the values for disp_amt and formatted_disp_amt have not changed from the original. Are there special constraints surrounding changing the basket values that don't allow for "on-the-fly' SMT changes?
in order to complement the functionality in the weight based shipping method. What I've tried unsuccessfully is as follows:
Just preceding the existing Order Charge foreach loop i've put an additional loop:
<mvt:foreach iterator="charge" array="basket:charges">
<mvt:item name="ry_toolbelt" param="assign|g.charge_cnt|g.charge_cnt + 1" />
<mvt:if expr="charge:descrip EQ 'whatever') ">
<mvt:item name="ry_toolbelt" param="assign|l.all_settings:basket:charges[g.charge_cnt]:disp_amt|99.90" />
<mvt:item name="ry_toolbelt" param="assign|l.all_settings:basket:charges[g.charge_cnt]:formatted_disp_amt|'$99.90'" />
</mvt:if>
</mvt:foreach>
When I look at the variable values using the toolbelt, the values for disp_amt and formatted_disp_amt have not changed from the original. Are there special constraints surrounding changing the basket values that don't allow for "on-the-fly' SMT changes?
Comment