Ben90 Posted February 16, 2015 Share Posted February 16, 2015 Hi guys, I'd like to get rid vouchers completely because we're not using it at the moment. Any clue how to disable or maybe I need to delete a particular code somewhere to make it disappear? Thanks Link to comment Share on other sites More sharing options...
shacker Posted February 17, 2015 Share Posted February 17, 2015 edit the shopping-cart.tpl of your theme. and you can remove this lines {if $voucherAllowed} {if isset($errors_discount) && $errors_discount} <ul class="alert alert-danger"> {foreach $errors_discount as $k=>$error} <li>{$error|escape:'html':'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> <h4>{l s='Vouchers'}</h4> <input type="text" class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> <input type="hidden" name="submitDiscount" /> <button type="submit" name="submitAddDiscount" class="button btn btn-default button-small"><span>{l s='OK'}</span></button> </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 class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'}</span> - {/if}{$voucher.name}<br /> {/foreach} </div> {/if} {/if} dont know wich ps version you use 1 Link to comment Share on other sites More sharing options...
Ben90 Posted February 17, 2015 Author Share Posted February 17, 2015 edit the shopping-cart.tpl of your theme. and you can remove this lines {if $voucherAllowed} {if isset($errors_discount) && $errors_discount} <ul class="alert alert-danger"> {foreach $errors_discount as $k=>$error} <li>{$error|escape:'html':'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> <h4>{l s='Vouchers'}</h4> <input type="text" class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> <input type="hidden" name="submitDiscount" /> <button type="submit" name="submitAddDiscount" class="button btn btn-default button-small"><span>{l s='OK'}</span></button> </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 class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'}</span> - {/if}{$voucher.name}<br /> {/foreach} </div> {/if} {/if} dont know wich ps version you use Oops, forgot to mention it. Prestashop 1.6.0.9 default theme. I comment out that code, clear cache on back office, refresh, but that vouchers form is still there Link to comment Share on other sites More sharing options...
shacker Posted March 15, 2015 Share Posted March 15, 2015 if you deleted that, must be deleted, are you sure dont have any other cache enabled? maybe try in other browser or pc Link to comment Share on other sites More sharing options...
Ben90 Posted March 16, 2015 Author Share Posted March 16, 2015 if you deleted that, must be deleted, are you sure dont have any other cache enabled? maybe try in other browser or pc Yeah mate. This is what I did: <!-- disable voucher {if $voucherAllowed} {if isset($errors_discount) && $errors_discount} <ul class="alert alert-danger"> {foreach $errors_discount as $k=>$error} <li>{$error|escape:'html':'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> <h4>{l s='Vouchers'}</h4> <input type="text" class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> <input type="hidden" name="submitDiscount" /> <button type="submit" name="submitAddDiscount" class="button btn btn-default button-small"><span>{l s='OK'}</span></button> </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 class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'}</span> - {/if}{$voucher.name}<br /> {/foreach} </div> {/if} {/if} --> I checked both on chrome & IE with the cache on browser cleared, but the voucher is still there: Link to comment Share on other sites More sharing options...
shacker Posted March 16, 2015 Share Posted March 16, 2015 instead of that, delete all the code Link to comment Share on other sites More sharing options...
Ben90 Posted March 20, 2015 Author Share Posted March 20, 2015 instead of that, delete all the code You mean all the code that I've commented out? Isn't it the same, mate? Link to comment Share on other sites More sharing options...
shacker Posted March 21, 2015 Share Posted March 21, 2015 well, sometimes dont work. remember force compile Link to comment Share on other sites More sharing options...
Ben90 Posted July 18, 2015 Author Share Posted July 18, 2015 well, sometimes dont work. remember force compile The Voucher is still there. I think that part of the code is not that one. Maybe there is something else that needs to be deleted or maybe for a 'quick order' page, the .tpl file is different? Link to comment Share on other sites More sharing options...
shacker Posted July 25, 2015 Share Posted July 25, 2015 send me your ftp in pm and i check Link to comment Share on other sites More sharing options...
Ben90 Posted August 7, 2015 Author Share Posted August 7, 2015 send me your ftp in pm and i check Looks like I found it. Hope it's not impacting another function in ordering steps. So I comment out this set of code: <form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher"> <fieldset> <h4>{l s='Vouchers'}</h4> <input type="text" class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /> <input type="hidden" name="submitDiscount" /> <button type="submit" name="submitAddDiscount" class="button btn btn-default button-small"><span>{l s='OK'}</span></button> </fieldset> </form> Link to comment Share on other sites More sharing options...
shacker Posted August 7, 2015 Share Posted August 7, 2015 i mark as solved Link to comment Share on other sites More sharing options...
Alexandra-Ionela Posted October 26, 2018 Share Posted October 26, 2018 Hi! How do I delete the Vouchers field from Checkout process in PrestaShop 1.6.1.22 and Warehouse theme. Can someome please tell me what lines of code should I delete and from where? I've read some posts here but those solutions don't working for me. Thank you in advance! 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