[英]Prestashop: issue with conditional statements in tpl file (PHP, Smarty)
我正在努力實現這一目標:
所以我正在使用以下文件:/public_html/themes/mytheme/templates/checkout/order-confirmation.tpl。 到目前為止我已經嘗試過這個:
{if ($order.shipping_weight >= 1.00) && ($logged)}
<div class="5-percent-voucher">Voucher</div>
{elseif ($order.shipping_weight >= 2.00) && ($logged)}
<div class="10-percent-voucher">Voucher</div>
{else}
{/if}
好消息是頁面不會崩潰。 壞消息是,當我模擬滿足條件的結帳時,什么也沒有顯示。
有誰知道我在這里做錯了什么? 非常感謝提前
這是因為在 1.7 你沒有$logged
,你需要使用$customer.is_logged
:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.