ornusweb Posted February 20, 2014 Share Posted February 20, 2014 Hello All, I am using Prestashop version 1.5.4.1 I am trying to include a condition to check whether the customer has entered a voucher/promo code in the cart and accordingly send payment details to the payment gateway. Here is the code: {include file="$tpl_dir./breadcrumb.tpl"} <h2>{l s='Order summary' mod='EBS'}</h2> {assign var='current_step' value='payment'} {if isset($nbProducts) && $nbProducts <= 0} <p class="warning">{l s='Your shopping cart is empty.'}</p> {else} <h3>{l s='You have chosen to pay by EBS' mod='EBS'}</h3> <form name="checkout_confirmation" action="{$ebsurl}" method="post" /> <input type="hidden" name="account_id" value="{$account_id}" /> <input type="hidden" name="reference_no" value="{$reference_no}" /> <input name="amount" type="hidden" value="{$total}" id="amount"/> <input name="description" type="hidden" value="{$description}" /> <!--added condition here checking for voucher--> {if isset($nbDiscounts)} <!--added 2 new input fields for vouchers--> <input name="bank_code" type="hidden" value="DEUTSCHE" /> <input name="bank_name" type="hidden" value="Deutsche Bank" /> {else} <!--no voucher--> {/if} <!--end--> I have tried with the following conditions to no avail: {if isset ($discounts)} {if isset ($nbDiscounts)} {if isset ($cart_rules)} {if isset($cart_rules) && count($cart_rules) && $nb_cart_rules} none of these conditions are satisified. Could anyone let me know what I am missing? thanks in advance!! Link to comment Share on other sites More sharing options...
connectcase Posted November 28, 2014 Share Posted November 28, 2014 Ever figured this out? I am also trying to show applied vouchers, but no idea how.... 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