如何在 smarty 获取运费?
How to get shipping in smarty?
smarty可以开条件吗?
在 .tpl 文件中,我只有 {cart_product_price} 来打印当前的购物车价格。
例如:
if ({cart_product_price} > 350){
echo 'shipping free';
}
当然可以。检查这个:
{if $cart_product_price > 350}
something...
{else}
something else...
{/if}
或者
{if ( $cart_product_price < 0 or $cart_product_price > 350 ) }
...
{/if}
在 Smarty 文档页面上查看更多信息:
http://www.smarty.net/docs/en/language.function.if.tpl
smarty可以开条件吗? 在 .tpl 文件中,我只有 {cart_product_price} 来打印当前的购物车价格。 例如:
if ({cart_product_price} > 350){
echo 'shipping free';
}
当然可以。检查这个:
{if $cart_product_price > 350}
something...
{else}
something else...
{/if}
或者
{if ( $cart_product_price < 0 or $cart_product_price > 350 ) }
...
{/if}
在 Smarty 文档页面上查看更多信息: http://www.smarty.net/docs/en/language.function.if.tpl