通过电子邮件发送用户的旅行包信息(CMS Made Simple、CGECommerce、Cart、Products等)



我正在使用CMS Made Simple以及Calguy的所有电子商务插件(产品、订单、购物车等),我不太清楚如何制作我需要的东西。如何使用"产品"模块中的项目和每个项目的复选框制作表格,并在最后将选中项目的总金额和损失发送给网站所有者?任何指针都将不胜感激,我可以计算出其余的。

如果您使用购物车模块,您可以尝试在"viewcart表单模板"下自定义viewcart模板。

一旦选择了产品,您就可以使用另一个模板将购物车的内容放入电子邮件中。这样的东西可以用来创建一个真正的基本列表+总列表:

{if !isset($cartitems) || count($cartitems) == 0 }
  <p>No products in the cart.</p>
{else}    
<ul>
{foreach from=$cartitems item='oneitem'}
<li>
{$oneitem->quantity}x {$oneitem->summary} ({$currencysymbol}{$oneitem->item_total|number_format:2})
{if $oneitem->quantity > 1}
({$currencysymbol}{$oneitem->base_price|number_format:2} each)
{/if}
</li>  
{/foreach}
</ul>
{$total_text}: {$currencysymbol}{$carttotal|number_format:2}
{/if}

您可以随时将{$cartems|print_r}临时插入到模板中,以查看智能代码中可用的属性。

最新更新