Jump to content

Hide quantity discounts table


Recommended Posts

you can remove quantity discounts from product.tpl file

just comment out this code:

{if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
<!-- quantity discount -->
<ul class="idTabs clearfix">
	<li><a href="#discount" style="cursor: pointer" class="selected">{l s='Sliding scale pricing'}</a></li>
</ul>
<div id="quantityDiscount">
	<table class="std">
	<thead>
		<tr>
			<th>{l s='Product'}</th>
			<th>{l s='From (qty)'}</th>
			<th>{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}{l s='Price'}{else}{l s='Discount'}{/if}</th>
		</tr>
	</thead>
	<tbody>
		{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
		<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
			<td>
				{if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
					{$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
				{else}
					{$product->getProductName($quantity_discount.id_product)}
				{/if}
			</td>
			<td>{$quantity_discount.quantity|intval}</td>
			<td>
				{if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
					{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}
						{convertPrice price=$productPrice-$quantity_discount.real_value|floatval}
					{else}
						-{convertPrice price=$quantity_discount.real_value|floatval}
					{/if}
				{else}
					{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}
						{convertPrice price = $productPrice-($productPrice*$quantity_discount.reduction)|floatval}
					{else}
						-{$quantity_discount.real_value|floatval}%
					{/if}
				{/if}
			</td>
		</tr>
		{/foreach}
	</tbody>
	</table>
</div>
{/if}

product.tpl is theme file located in your theme directory (themes/your_theme/product.tpl)

by comment out i mean that you ahve to use:

{*
{if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
<!-- quantity discount -->
<ul class="idTabs clearfix">
	<li><a href="#discount" style="cursor: pointer" class="selected">{l s='Sliding scale pricing'}</a></li>
</ul>
<div id="quantityDiscount">
	<table class="std">
	<thead>
		<tr>
			<th>{l s='Product'}</th>
			<th>{l s='From (qty)'}</th>
			<th>{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}{l s='Price'}{else}{l s='Discount'}{/if}</th>
		</tr>
	</thead>
	<tbody>
		{foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
		<tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
			<td>
				{if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
					{$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
				{else}
					{$product->getProductName($quantity_discount.id_product)}
				{/if}
			</td>
			<td>{$quantity_discount.quantity|intval}</td>
			<td>
				{if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
					{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}
						{convertPrice price=$productPrice-$quantity_discount.real_value|floatval}
					{else}
						-{convertPrice price=$quantity_discount.real_value|floatval}
					{/if}
				{else}
					{if Configuration::get('PS_DISPLAY_DISCOUNT_PRICE')}
						{convertPrice price = $productPrice-($productPrice*$quantity_discount.reduction)|floatval}
					{else}
						-{$quantity_discount.real_value|floatval}%
					{/if}
				{/if}
			</td>
		</tr>
		{/foreach}
	</tbody>
	</table>
</div>
{/if}
*}

instead of original code (i added {*  code  *})

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

Can someone please help me. I wanted to do the same "hide quantity discount table" and I used same coding as above but when I go to my website, I can still see quantity discount table. 

 

Am I doing anything wrong? because I am new to this.

 

That is how I did it, please tell me if I am doing anything wrong:

 

1. I log in to my hosting account.

2. Went to "File Manager".

3. Dowloaded "product.tpl"

4. Edit the coding above and saved it.

5. Uploaded "product.tpl" again via File Manager and it overwrite on product.tpl which was on File Manager.

 

I have also deleted browser cookies but I can still see quantity discount table. 

 

Any help will be much appreciated

 

Thank you

 

Nasjam

Link to comment
Share on other sites

Hi

 

Can someone please help me. I wanted to do the same "hide quantity discount table" and I used same coding as above but when I go to my website, I can still see quantity discount table. 

 

Am I doing anything wrong? because I am new to this.

 

That is how I did it, please tell me if I am doing anything wrong:

 

1. I log in to my hosting account.

2. Went to "File Manager".

3. Dowloaded "product.tpl"

4. Edit the coding above and saved it.

5. Uploaded "product.tpl" again via File Manager and it overwrite on product.tpl which was on File Manager.

 

I have also deleted browser cookies but I can still see quantity discount table. 

 

Any help will be much appreciated

 

Thank you

 

Nasjam

clear shop cache and temporarily turn on force compile under preferences > perfromance tab in your back office.

Link to comment
Share on other sites

  • 3 months later...

Didnt work for me ... I can hide table but Discount header is still there ... anyone?

 

Hello

 

I fixed this problem. I did followings:

 

For hiding the product discount table, simply write this CSS - #discounts_block{display: none;} in the last lines of this file - root/themes/css/product.css

Link to comment
Share on other sites

×
×
  • Create New...