Jump to content

Show the price of a certain product attribute


Recommended Posts

Hi, how can I show the price of a certain attribute (eg. bottle-size) on the product list page (product-list.tpl). Prestashop shows the price of an attribute that is in-stock, but I don't want that. For example, I have a default bottle-size of 60ml, so I want the price of that shown on the product-list page. But if I don't have any 60ml bottles in-stock, Prestashop shows the price of something I DO have in-stock, eg. 480ml bottles. That's plain wrong, because the default attribute is still 60ml, and it is still available for ordering.

Here's a snippet of my product-list.tpl

{convertPrice price=$product.price}
{if ($product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}
               <!-- {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if} -->
               {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
               <!--    {l s='Add to cart'} -->



Is there some kind of an API description anywhere? For example what methods are available in $product?

Thanks for your help,
mats

Link to comment
Share on other sites

×
×
  • Create New...