Jump to content

Lowest combination price in homefeatured


lightdown
 Share

Recommended Posts

Hello,

I want to know how to show always the lowest price (lowest combination price) in the home featured and product_list

I have done it in the product.tpl with the next code:

{if isset($groups)}
   {assign var="precioactual" value=$productPrice}
   {assign var="precio" value=$productPrice}
   {foreach from=$combinations key=idCombination item=combination}
	{assign var="preciocombinacion" value=($product->base_price+$combination.price)*1.21|floatval}								
	{if ($preciocombinacion < $precio)}													
	    {assign var="precioactual" value=$preciocombinacion}
	{/if}
  {/foreach}
  {convertPrice price=$precioactual}
  {else}
   {convertPrice price=$productPrice}
{/if}

But, $combinations seems not to be defined in category or homefeatured.

How can I do it?

 

thanks

Share this post


Link to post
Share on other sites

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More