Jump to content

How To Add Reduction Percentage To Product-List Page?


Recommended Posts

Hello Sir/Madam,

 

Can anyone teach me how to add reduction percentage to product-list page? I copied the code from product.tpl and pasted it to the product-list.tpl, but it doesn't worked. The code i copied:

 

 

{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}

<p id="reduction_percent">{l s='You Save:'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}(%{l s=')'}</span> </p>

{/if}

 

I am using PS1.4.2.5

 

Please advice and help. Thank you very much.

 

Best regards,

Derox

Link to comment
Share on other sites

The easiest way to have a percentage off for all products would be customers/groups you will see an area when you can edit a group, there you can add a percentage off all products.

This can be applied to either a customer group or a product group.

 

(pic deleted)

You can also have different groups of customers with different dicounts.

 

If you are looking for a way to show product price and your discount price that is done under each product /prices Add a new specific price.

This will also cause the product to show PRICE REDUCED by X%,

This first option will not show anything but the price with the percentage discount already applied.

 

 

Hope this is what you were looking for.

Link to comment
Share on other sites

Hello Sir/Madam,

 

Can anyone teach me how to add reduction percentage to product-list page? I copied the code from product.tpl and pasted it to the product-list.tpl, but it doesn't worked. The code i copied:

 

 

{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}

<p id="reduction_percent">{l s='You Save:'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}(%{l s=')'}</span> </p>

{/if}

 

I am using PS1.4.2.5

 

Please advice and help. Thank you very much.

 

Best regards,

Derox

 

 

Dear friend,

 

I had the same problem and couldnt find the solution nowhere on the internet (except some offer for custom programming that needs to be payed). Here is my solution that should work for you - if so please mark this topic as SOLVED.

Put the code in product-list.tpl somewhere inside right_block div..

 

 

 

       	 {if $product.price_without_reduction neq $product.price}

                                <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span>
                                   {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices}
                  	                 {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}
                      	                 (-{$pro_specific_prices.reduction * 100|floatval}%)
                      		         {/if}
                                   {/if}
                               {/if}

 

Greetz from Croatia.

  • Like 3
Link to comment
Share on other sites

  • 1 month later...

The easiest way to have a percentage off for all products would be customers/groups you will see an area when you can edit a group, there you can add a percentage off all products.

This can be applied to either a customer group or a product group.

 

You can also have different groups of customers with different dicounts.

 

What to do if I want to display this kind of reduction in products list (product-list.tpl) and/or in product detail (product.tpl)?

Thanks!

Link to comment
Share on other sites

  • 8 months later...

The easiest way to have a percentage off for all products would be customers/groups you will see an area when you can edit a group, there you can add a percentage off all products.

This can be applied to either a customer group or a product group.

 

(pic deleted)

You can also have different groups of customers with different dicounts.

 

If you are looking for a way to show product price and your discount price that is done under each product /prices Add a new specific price.

This will also cause the product to show PRICE REDUCED by X%,

This first option will not show anything but the price with the percentage discount already applied.

 

 

Hope this is what you were looking for.

 

Hey TDR170

 

I have an issue when I try to user customer groups to apply a discount to all of one category. It does reduce the price but it's not showing price reduced within the products page. How can I use this function and also show reduced price in the products page?

 

Thank you

Clayton

Edited by clayton29657 (see edit history)
Link to comment
Share on other sites

  • 4 months 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...