Daniele0884 Posted November 9, 2018 Share Posted November 9, 2018 Hi, I'm trying to show voucher name on product list. I have added the code of cart-voucher.tpl {if $cart.vouchers.allowed} {block name='cart_voucher'} <div class="block-promo"> <div class="cart-voucher"> {if $cart.vouchers.added} {block name='cart_voucher_list'} <ul class="promo-name card-block"> {foreach from=$cart.vouchers.added item=voucher} <li class="cart-summary-line"> <span class="label">{$voucher.name}</span> </li> {/foreach} </ul> {/block} {/if} </div> </div> {/block} {/if} inside the file tpl. I can see the voucher name on product list, but it is showed on all products. I want add the condition 'if product have voucher' , for to show the voucher name only on product that have voucher associate. I don't know how to do, can anyone help me. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now