html Miva mvt:做自定义充值模板

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Miva mvt:做自定义充值模板相关的知识,希望对你有一定的参考价值。

<mvt:comment>
|
|
|	Efficient mvt:do custom upcharges - function similar to toolkit upcharges
|		assign the 4 below variables and drop in anywhere above basket charge loop
|
|
</mvt:comment>
<mvt:assign name="g.customCharge:value" value="28" />
<mvt:assign name="g.customCharge:type" value="'CustomUpcharge'" />
<mvt:assign name="g.customCharge:descrip" value="'Wire Transfer Fee'" />
<mvt:assign name="g.customCharge:taxExempt" value="0" />

<mvt:comment>clear all previous charges of type, prevents double charging</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="BasketCharge_Delete_All_Type( g.basket:basket_id, g.customCharge:type )" />

<mvt:comment>make the charge item</mvt:comment>
<mvt:assign name="l.basketcharge:basket_id" value="g.basket:basket_id" />
<mvt:assign name="l.basketcharge:module_id" value="l.settings:store:tax_mod:id" />
<mvt:assign name="l.basketcharge:type" value="g.customCharge:type" />
<mvt:assign name="l.basketcharge:descrip" value="g.customCharge:descrip" />
<mvt:assign name="l.basketcharge:amount" value="g.customCharge:value" />
<mvt:assign name="l.basketcharge:disp_amt" value="g.customCharge:value" />
<mvt:assign name="l.basketcharge:tax_exempt" value="g.customCharge:taxExempt" />

<mvt:comment>insert charge</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="g.null" value="BasketCharge_Insert( l.basketcharge )" />

<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:basket: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>

以上是关于html Miva mvt:做自定义充值模板的主要内容,如果未能解决你的问题,请参考以下文章

html Miva - mvt:do load Variants

html Miva - 以mvt:do为顾客购物

html Miva - mvt:调用搜索Spring API

html Miva - mvt:do - 检查客户是否在可用性组中

xml Miva - mvt:debug

xml Miva - mvt:调用基本授权标题