开发者

Email travel package info from user (CMS Made Simple, CGECommerce, Cart, Products, etc.)

I am using CMS Made Simple along with all o开发者_JAVA百科f Calguy's plugins for e-commerce(Products, Orders, Cart, etc.)I can't quite figure out how to make what I need. How can I make a form with items from the Products module and checkboxes for each, and at the end a total and lost for the checked items is sent to the owner of the site? Any pointers would be appreciated much, I can figure out the rest.


If you use the Cart Module you could try customizing a viewcart template under "Viewcart Form Templates".

Once products are selected you can use another template to put the contents of the cart in an email. Something like this can be used to create a really basic list + total listing:

{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}

You can always temporarily insert {$cartitems|print_r} into your template to view the attributes that are available for use in the smarty code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜