Madsognico Posted July 24, 2013 Share Posted July 24, 2013 (edited) Hello everyone. I have upgraded a shop from 1.3.1.1 to 1.5.4.1, and everything sort of went fine. Though I have a few things not working. As you can see on the picture (picture of shopping cart) there is not line to enter the voucher code. I have 2 voucher codes activated in my backoffice, so that shouldn't be a problem. Here is the code from my shopping-cart.tpl from the theme: <div class="col-2 span4"> <div class="discount"> <h2>{l s='Discount Codes'}</h2> <div class="discount-form"> <label for="coupon_code">{l s='Enter your coupon code if you have one.'}</label> {if $voucherAllowed} {if isset($errors_discount) && $errors_discount} <ul class="error"> {foreach $errors_discount as $k=>$error} <li>{$error|escape:'htmlall':'UTF-8'}</li> {/foreach} </ul> {/if} <form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher"> <fieldset> <p class="title_block"><label for="discount_name">{l s='Vouchers'}</label></p> <p class="discount_name_block"> <input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> </p> <div class="buttons-set"><input type="hidden" name="submitDiscount" /> <button type="submit" name="submitAddDiscount" title="Apply Coupon" class="button" value="Apply Coupon"><span><span>{l s='Apply Coupon'}</span></span></button> </div> </fieldset> </form> {if $displayVouchers} <p id="title" class="title_offers">{l s='Take advantage of our exclusive offers:'}</p> <div id="display_cart_vouchers"> {foreach $displayVouchers as $voucher} {if $voucher.code != ''}<span onclick="$('#discount_name').val('{$voucher.code}');return false;" class="voucher_name">{$voucher.code}</span> - {/if}{$voucher.name}<br /> {/foreach} </div> {/if} {/if} </div> </div> </div> Edited July 24, 2013 by Madsognico (see edit history) Link to comment Share on other sites More sharing options...
Madsognico Posted July 24, 2013 Author Share Posted July 24, 2013 Ah well, once again I solved this myself. I'm adding it to the title! Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 hello thanks for information that you solved it. can you say something more about what was wrong there? i will be gratefull thanks Link to comment Share on other sites More sharing options...
Madsognico Posted July 24, 2013 Author Share Posted July 24, 2013 I found the ps_configuration in my database and changed PS_CART_RULE_FEATURE_ACTIVE from 0 to 1 and it worked 1 Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 thank you for solution im conviced that it will be helpfull for other forum members with the same issue i really appreciate your help here many thanks again best regards Link to comment Share on other sites More sharing options...
bozor2 Posted July 29, 2013 Share Posted July 29, 2013 Hi, I've similar problem. PS 1.4.6 when I've inserted the voucher code in the cart (voucher name random create by prestashop with the 10% on total amount, with correct data, all clients and etc.. ) and I clicked add, it shows "voucher code don't applicable" and didn't calculate nothing. in the cart i've added 3 items. The theme is the prestashop default. How I can solve this problem?How I can modify my file .php? This my DiscountController.php in the path public_html/controllers/DiscountController.php class DiscountControllerCore extends FrontController { public $auth = true; public $php_self = 'discount.php'; public $authRedirection = 'discount.php'; public $ssl = true; public function process() { parent::process(); $discounts = Discount::getCustomerDiscounts((int)(self::$cookie->id_lang), (int)(self::$cookie->id_customer), true, false); $nbDiscounts = 0; foreach ($discounts AS $discount) if ($discount['quantity_for_user']) $nbDiscounts++; self::$smarty->assign(array('nbDiscounts' => (int)($nbDiscounts), 'discount' => $discounts)); } public function displayContent() { parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.'discount.tpl'); } } Thanks Link to comment Share on other sites More sharing options...
Swinky Posted September 13, 2013 Share Posted September 13, 2013 I found the ps_configuration in my database and changed PS_CART_RULE_FEATURE_ACTIVE from 0 to 1 and it worked Thanks Madsognico, worked a charm. 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