html Miva - 添加已删除的产品返回购物车
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Miva - 添加已删除的产品返回购物车相关的知识,希望对你有一定的参考价值。
<mvt:assign name="g.Restore_Counter" value="1" />
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:while expr="NOT ISNULL g.Quantity">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Link" value="miva_variable_value('Restore_Link' $ g.Restore_Counter)" />
<mvt:if expr="NOT ISNULL g.Quantity AND g.Quantity EQ 0">
<div class="message message-info">
<b>&mvte:global:Restore_Name;</b> has been removed from your cart. <a href="&mvte:global:Restore_Link;">Undo?</a>
</div>
</mvt:if>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:while>
<form method="POST" action="&mvte:urls:BASK:auto;">
<input type="hidden" name="SubScreen" value="TKQNTY">
<input type="hidden" name="Action" value="NEW">
...
<mvt:foreach iterator="item" array="basket:item">
...
<mvt:assign name="l.settings:item:restore:link" value="g.domain:mm_url $ 'Screen=BASK&Action=ADPR&Product_Code=' $ l.settings:item:standard_code $ '&Quantity=' $ l.settings:item:quantity" />
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:option_id">
<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ g.option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ g.option_counter $ ']:value=' $ l.settings:option:opt_code" />
...
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ g.option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ g.option_counter $ ']:value=' $ l.settings:option:data" />
...
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ g.option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ g.option_counter $ ']:value=' $ l.settings:option:data_long" />
...
<mvt:else>
<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ g.option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ g.option_counter $ ']:value=' $ l.settings:option:data" />
...
</mvt:if>
</mvt:foreach>
...
<input type="text" name="Quantity&mvte:global:counter;" value="&mvte:item:quantity;">
<input type="hidden" name="Basket_line&mvte:global:counter;" value="&mvte:item:line_id;" />
<input type="hidden" name="Restore_Link&mvte:global:counter;" value="&mvte:item:restore:link;">
<input type="hidden" name="Restore_Name&mvte:global:counter;" value="&mvte:item:name;">
...
</mvt:foreach>
</form>
以上是关于html Miva - 添加已删除的产品返回购物车的主要内容,如果未能解决你的问题,请参考以下文章
html Miva - 获取刚刚添加到购物车的商品
我已使用 selenium web 驱动程序 JAVA 将产品添加到手推车中,然后将其从购物车中删除。我如何断言产品是不是被移除?
html Miva - 产品多添加
html Miva - Google购物Feed - v2
html Miva - 以mvt:do为顾客购物
html Miva - 使用购物篮自定义字段预览功能