xml Miva - 添加和删除篮子费用

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml Miva - 添加和删除篮子费用相关的知识,希望对你有一定的参考价值。

<mvt:if expr="g.Delete_Charge">
	<h2>Delete Charge</h2>
	<mvt:do file="g.Module_Library_DB" name="l.gone" value="BasketCharge_Delete_All_Type(g.Basket:basket_id, 'CUSTOM_CHARGE')" />
</mvt:if>


<mvt:if expr="g.Add_Charge">
	<mvt:assign name="l.basket_charge:basket_id" value="g.Basket:basket_id" />
	<mvt:assign name="l.basket_charge:module_id" value="0" />
	<mvt:assign name="l.basket_charge:type" value="'CUSTOM_CHARGE'" />
	<mvt:assign name="l.basket_charge:descrip" value="'Custom Charge'" />
	<mvt:assign name="l.basket_charge:amount" value="-20" />
	<mvt:assign name="l.basket_charge:disp_amt" value="'-20.00'" />
	<mvt:assign name="l.basket_charge:tax_exempt" value="0" />
	<mvt:comment>insert charge</mvt:comment>
	<mvt:do file="g.Module_Library_DB" name="l.chargecount" value="BasketCharge_Insert( l.basket_charge )" />
</mvt:if>

<mvt:if expr="g.Delete_Charge OR g.Add_Charge">
	<mvt:comment>
		| Reload Charges List
	</mvt:comment>
	<mvt:do file="g.Module_Library_DB" name="l.success" value="BasketChargeList_Load_Basket( g.Basket:basket_id, l.settings:charges )" /><mvt:comment>For some reason, using `l.settings:basket:charges` would never "refresh" the charges on the page, so we'll need to reassign it</mvt:comment>
	<mvt:assign name="l.settings:basket:charges" value="l.settings:charges" />

	<mvt:comment>
		| Regenerate Currency Formatted Charges
	</mvt:comment>
	<mvt:foreach iterator="charge" array="basket:charges">
		<mvt:do file="g.Module_Store_Module_Currency" name="l.settings:charge:formatted_disp_amt" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:charge:amount )" />
	</mvt:foreach>

	<mvt:comment>
		| Reload Basket Totals
	</mvt:comment>
	<mvt:do file="g.Module_Library_DB" name="l.settings:basket:total" value="Basket_Total( g.Basket:basket_id )" />
	<mvt:do file="g.Module_Store_Module_Currency" name="l.settings:basket:formatted_total" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:basket:total )" />
	Total: &mvt:basket:formatted_total;<br>

	<mvt:do file="g.Module_Library_DB" name="l.settings:basket:sub_total" value="Basket_SubTotal( g.Basket:basket_id )" />
	<mvt:do file="g.Module_Store_Module_Currency" name="l.settings:basket:formatted_sub_total" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:basket:sub_total )" />
	Sub Total: &mvt:basket:formatted_sub_total;<br>

	<mvt:do file="g.Module_Library_DB" name="l.settings:basket:item_total" value="BasketItem_Total( g.Basket:basket_id )" />
	<mvt:do file="g.Module_Store_Module_Currency" name="l.settings:basket:formatted_item_total" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:basket:item_total )" />
	Item Total: &mvt:basket:formatted_item_total;<br>
</mvt:if>

以上是关于xml Miva - 添加和删除篮子费用的主要内容,如果未能解决你的问题,请参考以下文章

xml Miva - 变异篮子项目替换与修复的Skipped产品

xml Miva - 变异篮子项目替换与自定义领域排除产品

xml Miva - URI添加,删除和删除所有XML配置

xml 更新篮子费用清单

xml SD4 Miva9更改==如果他们没有使用MIVA9优惠券,请删除优惠券==

xml SD4 Miva9更改==如果他们没有使用MIVA9优惠券,请删除优惠券==