Jump to content

How to: Show Displayed text when in-stock on main page


osckar

Recommended Posts

Add the following code above line 20 of modules/homefeatured/homefeatured.tpl (the view button):

<!-- availability -->


{l s='Availability:'}

       {if $product.quantity == 0}{if $allow_oosp}{$product.available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product.available_now}{/if}

        



Then add the following at line 995 of css/global.css in your theme's directory (in the /* Styles for products blocks */ section):

.products_block li p#availability_statut
{
   text-align: center;    
}



You can add more styles to the above code to customise the display.

Link to comment
Share on other sites

Thanks! That did the trick :)

Now, where and what do I need to edit to put the same modification on product page?

I mean, I want that the in-stock text message appear just below the price, above quantity and remove the current Availability section below the quantity.

Thanks in advance!

Link to comment
Share on other sites

Just move the following code in product.tpl from line 261 up to line 234 (just before {if isset($groups)}):

<!-- availability -->

quantity == 0 && !$product->available_later) || (!$product->available_now && $display_qties != 1) } style="display:none;"{/if}>
{l s='Availability:'}
quantity == 0} class="warning-inline"{/if}>
       {if $product->quantity == 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}


Link to comment
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
×
×
  • Create New...