Fadyselim Posted May 17, 2013 Share Posted May 17, 2013 (edited) hi all, I have followed the steps to create a voucher but somehow there is no box that displays an input for the voucher codes... i have modified the default theme but i never touched anything that had to do with the payment systems or ordering so it's not like i altered anything like that but i am literally out of ideas I do not know why that input box is not showing up whilst i have 2 active vouchers! prestashop version is 1.5.3.1 screen of the active vouchers is attached and website is www.monisdierenwebshop.nl it is a dutch only website meaning no english is supported on it... but it is default theme so... (only slightly modified css...) any help would be greatly appreciated since my vouchers now are not working... Edited May 17, 2013 by Fadyselim (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 hello check the ps_configuration, look for: PS_CART_RULE_FEATURE_ACTIVE what is the value of this configuration option? it must be "1" 2 Link to comment Share on other sites More sharing options...
Fadyselim Posted May 17, 2013 Author Share Posted May 17, 2013 i have just checked in the database and it was already set at 1 as you can see below (copied the whole rule) so that is not the problem 146 NULL NULL PS_CART_RULE_FEATURE_ACTIVE 1 2013-03-14 20:47:31 2013-04-19 02:17:14 Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 I checked your website, you use non default template, maybe it is a theme issue? Link to comment Share on other sites More sharing options...
Fadyselim Posted May 17, 2013 Author Share Posted May 17, 2013 well in the core it is the default template with most modifications css wise (and just a few being in the template files but not the order payment files) If it would be a template issue, then i have no idea how that could have gone bad :/ I have attached my order-payment.tpl file of the theme, thank you for the help, I really appreciate it and if you need more info then please just ask {* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if !$opc} <script type="text/javascript"> // <![CDATA[ var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}'; var currencyRate = '{$currencyRate|floatval}'; var currencyFormat = '{$currencyFormat|intval}'; var currencyBlank = '{$currencyBlank|intval}'; var txtProduct = "{l s='product'}"; var txtProducts = "{l s='products'}"; // ]]> </script> {capture name=path}{l s='Your payment method'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} {/if} {if !$opc}<h1>{l s='Choose your payment method'}</h1>{else}<h2><span>2</span> {l s='Choose your payment method'}</h2>{/if} {if !$opc} {assign var='current_step' value='payment'} {include file="$tpl_dir./order-steps.tpl"} {include file="$tpl_dir./errors.tpl"} {else} <div id="opc_payment_methods" class="opc-main-block"> <div id="opc_payment_methods-overlay" class="opc-overlay" style="display: none;"></div> {/if} <div class="paiement_block"> <div id="HOOK_TOP_PAYMENT">{$HOOK_TOP_PAYMENT}</div> {if $HOOK_PAYMENT} {if !$opc} <div id="order-detail-content" class="table_block"> <table id="cart_summary" class="std"> <thead> <tr> <th class="cart_product first_item">{l s='Product'}</th> <th class="cart_description item">{l s='Description'}</th> <th class="cart_availability item">{l s='Avail.'}</th> <th class="cart_unit item">{l s='Unit price'}</th> <th class="cart_quantity item">{l s='Qty'}</th> <th class="cart_total last_item">{l s='Total'}</th> </tr> </thead> <tfoot> {if $use_taxes} {if $priceDisplay} <tr class="cart_total_price"> <td colspan="5">{if $display_tax_label}{l s='Total products (tax excl.):'}{else}{l s='Total products:'}{/if}</td> <td class="price" id="total_product">{displayPrice price=$total_products}</td> </tr> {else} <tr class="cart_total_price"> <td colspan="5">{if $display_tax_label}{l s='Total products (tax incl.):'}{else}{l s='Total products:'}{/if}</td> <td class="price" id="total_product">{displayPrice price=$total_products_wt}</td> </tr> {/if} {else} <tr class="cart_total_price"> <td colspan="5">{l s='Total products:'}</td> <td class="price" id="total_product">{displayPrice price=$total_products}</td> </tr> {/if} <tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}> <td colspan="5"> {if $use_taxes} {if $priceDisplay} {if $display_tax_label}{l s='Total vouchers (tax excl.):'}{else}{l s='Total vouchers:'}{/if} {else} {if $display_tax_label}{l s='Total vouchers (tax incl.):'}{else}{l s='Total vouchers:'}{/if} {/if} {else} {l s='Total vouchers:'} {/if} </td> <td class="price-discount price" id="total_discount"> {if $use_taxes} {if $priceDisplay} {displayPrice price=$total_discounts_tax_exc} {else} {displayPrice price=$total_discounts} {/if} {else} {displayPrice price=$total_discounts_tax_exc} {/if} </td> </tr> <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}> <td colspan="5"> {if $use_taxes} {if $priceDisplay} {if $display_tax_label}{l s='Total gift-wrapping (tax excl.):'}{else}{l s='Total gift-wrapping:'}{/if} {else} {if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if} {/if} {else} {l s='Total gift-wrapping:'} {/if} </td> <td class="price-discount price" id="total_wrapping"> {if $use_taxes} {if $priceDisplay} {displayPrice price=$total_wrapping_tax_exc} {else} {displayPrice price=$total_wrapping} {/if} {else} {displayPrice price=$total_wrapping_tax_exc} {/if} </td> </tr> {if $total_shipping_tax_exc <= 0 && !isset($virtualCart)} <tr class="cart_total_delivery"> <td colspan="5">{l s='Shipping:'}</td> <td class="price" id="total_shipping">{l s='Free Shipping!'}</td> </tr> {else} {if $use_taxes} {if $priceDisplay} <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}> <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}</td> <td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td> </tr> {else} <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}> <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td> <td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td> </tr> {/if} {else} <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}> <td colspan="5">{l s='Total shipping:'}</td> <td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td> </tr> {/if} {/if} {if $use_taxes} <tr class="cart_total_price"> <td colspan="5" id="cart_voucher" class="cart_voucher"> {if $voucherAllowed} {if isset($errors_discount) && $errors_discount} <ul class="error"> {foreach from=$errors_discount key=k item=error} <li>{$error|escape:'htmlall':'UTF-8'}</li> {/foreach} </ul> {/if} {/if} </td> <td colspan="2" class="price total_price_container" id="total_price_container"> <p>{l s='Total:'}</p> <span>{displayPrice price=$total_price}</span> </td> </tr> {else} <tr class="cart_total_price"> <td colspan="5" id="cart_voucher" class="cart_voucher"> {if $voucherAllowed} <div id="cart_voucher" class="table_block"> {if isset($errors_discount) && $errors_discount} <ul class="error"> {foreach from=$errors_discount key=k item=error} <li>{$error|escape:'htmlall':'UTF-8'}</li> {/foreach} </ul> {/if} {if $voucherAllowed} <form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher"> <fieldset> <h4><label for="discount_name">{l s='Vouchers'}</label></h4> <p> <input type="text" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> </p> <p class="submit"><input type="text" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='ok'}" class="button" /></p> {if $displayVouchers} <h4 class="title_offers">{l s='Take advantage of our offers:'}</h4> <div id="display_cart_vouchers"> {foreach from=$displayVouchers item=voucher} <span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br /> {/foreach} </div> {/if} </fieldset> </form> {/if} </div> {/if} </td> <td colspan="2" class="price total_price_container" id="total_price_container"> <p>{l s='Total:'}</p> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> </tr> {/if} </tfoot> <tbody> {foreach from=$products item=product name=productLoop} {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute} {assign var='quantityDisplayed' value=0} {assign var='cannotModify' value=1} {assign var='odd' value=$product@iteration%2} {assign var='noDeleteButton' value=1} {* Display the product line *} {include file="$tpl_dir./shopping-cart-product-line.tpl"} {* Then the customized datas ones*} {if isset($customizedDatas.$productId.$productAttributeId)} {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization'} <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item"> <td colspan="4"> {foreach from=$customization.datas key='type' item='datas'} {if $type == $CUSTOMIZE_FILE} <div class="customizationUploaded"> <ul class="customizationUploaded"> {foreach from=$datas item='picture'} <li> <img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /> </li> {/foreach} </ul> </div> {elseif $type == $CUSTOMIZE_TEXTFIELD} <ul class="typedText"> {foreach from=$datas item='textField' name='typedText'} <li> {if $textField.name} {l s='%s:' sprintf=$textField.name} {else} {l s='Text #%s:' sprintf=$smarty.foreach.typedText.index+1} {/if} {$textField.value} </li> {/foreach} </ul> {/if} {/foreach} </td> <td class="cart_quantity"> {if isset($cannotModify) AND $cannotModify == 1} <span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span> {else} <div style="float:right"> <a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a> </div> <div id="cart_quantity_button" style="float:left"> <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br /> {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}"> <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" /> </a> {else} <a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}"> <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" /> </a> {/if} </div> <input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/> <input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}"/> {/if} </td> <td class="cart_total"></td> </tr> {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity} {/foreach} {* If it exists also some uncustomized products *} {if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl"}{/if} {/if} {/foreach} {assign var='last_was_odd' value=$product@iteration%2} {foreach $gift_products as $product} {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute} {assign var='quantityDisplayed' value=0} {assign var='odd' value=($product@iteration+$last_was_odd)%2} {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} {assign var='cannotModify' value=1} {* Display the gift product line *} {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} {/foreach} </tbody> {if count($discounts)} <tbody> {foreach from=$discounts item=discount name=discountLoop} <tr class="cart_discount {if $smarty.foreach.discountLoop.last}last_item{elseif $smarty.foreach.discountLoop.first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}"> <td class="cart_discount_name" colspan="2">{$discount.name}</td> <td class="cart_discount_description" colspan="3">{$discount.description}</td> <td class="cart_discount_price"> <span class="price-discount"> {if $discount.value_real > 0} {if !$priceDisplay} {displayPrice price=$discount.value_real*-1} {else} {displayPrice price=$discount.value_tax_exc*-1} {/if} {/if} </span> </td> </tr> {/foreach} </tbody> {/if} </table> </div> {/if} {if $opc}<div id="opc_payment_methods-content">{/if} <div id="HOOK_PAYMENT">{$HOOK_PAYMENT}</div> {if $opc}</div>{/if} {else} <p class="warning">{l s='No payment modules have been installed.'}</p> {/if} {if !$opc} <p class="cart_navigation"><a href="{$link->getPageLink('order', true, NULL, "step=2")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a></p> {else} </div> {/if} </div> Link to comment Share on other sites More sharing options...
outsider.itc Posted October 1, 2014 Share Posted October 1, 2014 hi all, me too was having this strange bug, sometimes it appears also in different installs and config of the same source, BUT the issue shuld be given by a sh* JS conflict of some module installed (maybe paypal?? maybe FB login?? i had the bug on a production environment so couldn't test)FIX in your themes/yourtheme/shopping-cart.tpl at lines 106,133,170change - id="cart_voucher" - with - id="other_id" -Then voucher form will display again , css layout doesn't change and i don't actually know if there are other consequences of this changement. 1 Link to comment Share on other sites More sharing options...
vekia Posted October 1, 2014 Share Posted October 1, 2014 hi all, me too was having this strange bug, sometimes it appears also in different installs and config of the same source, BUT the issue shuld be given by a sh* JS conflict of some module installed (maybe paypal?? maybe FB login?? i had the bug on a production environment so couldn't test) FIX in your themes/yourtheme/shopping-cart.tpl at lines 106,133,170 change - id="cart_voucher" - with - id="other_id" - Then voucher form will display again , css layout doesn't change and i don't actually know if there are other consequences of this changement. for what ps version is your fix? 2 Link to comment Share on other sites More sharing options...
outsider.itc Posted October 1, 2014 Share Posted October 1, 2014 for what ps version is your fix? 1.6 Link to comment Share on other sites More sharing options...
wzshop Posted October 6, 2014 Share Posted October 6, 2014 thank you for the fix! 1 Link to comment Share on other sites More sharing options...
Guest Kaylabs Posted October 26, 2014 Share Posted October 26, 2014 (edited) thanks for the fix, got the same problem on 1.6.0.6 this is due to paypal module, i've just installed that one before vouchers disappearance look around line 50 in the paypal.js /* 1.5 One page checkout*/ var qty = $('.qty-field.cart_quantity_input').val(); $('.qty-field.cart_quantity_input').after(qty); $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); Edited October 26, 2014 by Kaylabs (see edit history) Link to comment Share on other sites More sharing options...
moraira Posted November 14, 2015 Share Posted November 14, 2015 hello check the ps_configuration, look for: PS_CART_RULE_FEATURE_ACTIVE what is the value of this configuration option? it must be "1" Vekia like a boss mate, 48 hours looking the posible solution to "voucher input box not showing" and it was this stupid thing. we use PS 1.6.1.1 Vekia eres el puto amo tio, 48 horas buscando la solucion a "no aparece el cuadro de introduccion de cupones" y era esta tonteria, usamos PS 1.6.1.1 great Link to comment Share on other sites More sharing options...
Goosenebs Posted February 13, 2016 Share Posted February 13, 2016 Hi all My vouchers seem to work on the mobile version of my site but not the desktop version of the site. Maybe it's a simple fix. My site is SimonJohnDesigns.com Thanks Link to comment Share on other sites More sharing options...
AlexFL Posted May 25, 2017 Share Posted May 25, 2017 Check the post above for the PayPal module, I just delete #cart_voucher and now it works. Prestashop 1.6.6 Link to comment Share on other sites More sharing options...
oshoot Posted March 19, 2018 Share Posted March 19, 2018 On 10/26/2014 at 11:30 AM, Guest Kaylabs said: what part needs to be fixed? Mine shows .cart_quantity_delete, #cart_voucher *').remove(); /* 1.5 One page checkout*/ var qty = $('.qty-field.cart_quantity_input').val(); $('.qty-field.cart_quantity_input').after(qty); $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); Link to comment Share on other sites More sharing options...
jordifs Posted June 12, 2018 Share Posted June 12, 2018 (edited) On 26/10/2014 at 4:30 PM, Guest Kaylabs said: thanks for the fix, got the same problem on 1.6.0.6 this is due to paypal module, i've just installed that one before vouchers disappearance look around line 50 in the paypal.js /* 1.5 One page checkout*/ var qty = $('.qty-field.cart_quantity_input').val(); $('.qty-field.cart_quantity_input').after(qty); $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); Thanks for the clue. That code is within a condition (if-then) that I removed completely to solve this problem. It seems to be linked to paypal feature express checkout (one page checkout). That feature skips one step in buy order checkout and pre-select the payment option to move forward. If you do not use that feature, then this code "should not be active". If you do not need that feature, then you can remove it, as it should do no harm. In that same javascript file I also removed the next if-then clause (because it was linked to another error of mine). Somehow having the feature disabled, for some customers is enabled and seriously disrupts prestashop handling the process order checkout (invalid page redirect, payment options shown incorrectly, checkbox legal terms fails, difficult to reproduce though). {if isset($paypal_confirmation)} {literal} $('#container_express_checkout').hide(); if(jquery_version[0] >= 1 && jquery_version[1] >= 7) { $('body').on('click',"#cgv", function () { if ($('#cgv:checked').length != 0) $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); }); } else { $('#cgv').live('click', function () { if ($('#cgv:checked').length != 0) $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); }); /* old jQuery compatibility */ $('#cgv').click(function () { if ($('#cgv:checked').length != 0) $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); }); } {/literal} {else if isset($paypal_order_opc)} {literal} var jquery_version = $.fn.jquery.split('.'); if(jquery_version[0]>=1 && jquery_version[1] >= 7) { $('body').on('click','#cgv', function() { if ($('#cgv:checked').length != 0) checkOrder(); }); } else { $('#cgv').live('click', function() { if ($('#cgv:checked').length != 0) checkOrder(); }); /* old jQuery compatibility */ $('#cgv').click(function() { if ($('#cgv:checked').length != 0) checkOrder(); }); } {/literal} {/if} Edited June 12, 2018 by jordifs (see edit history) 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