Jump to content
tinhduong

Featured Product v0.9, How to display "out of stock" if stock=0

Recommended Posts

I'm using prestashop with theme Prestashop_new

I want to display "Out of stock" when product is out of stock.

 

I've read something in this forum ( Edit homefeatured.tpl ). I edited to :

 

  {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}
  <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a>
  {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
   {if ($product.quantity > 0 OR $product.allow_oosp)}
   <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to Cart' mod='homefeatured'}">{l s='Add to Cart' mod='homefeatured'}</a>
   {else}
   <span class="exclusive"> {l s='Out of stock' mod='homefeatured'}</span>
   {/if}
  {else}
   <div style="height:23px;"></div>
  {/if}

 

But it still doesn't work.

 

I tried to edit /themes/prestashop_new/modules/homefeatured/homefeatured.tpl with the same content as above. But my site still look like the attached image.

 

 

Please help :)

 

Thank you

post-393107-0-01412200-1346320100_thumb.png

Share this post


Link to post
Share on other sites

Hello,

 

Did you force compilation and disable cache use for smarty ?

You can also delete tpl.php files in tools\smarty\compile folder ?

 

If not working, put something (like "hello" for example) in the tpl where it must always be displayed.

 

Good luck :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

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