Jump to content

Can I Disable or Delete "Vouchers" on Shopping-Cart Summary page?


Ben90

Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

 

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  :mellow:

Link to comment
Share on other sites

  • 4 weeks later...

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:

2liajqv.jpg

Link to comment
Share on other sites

  • 3 months later...

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

  • 2 weeks later...

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

  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...