Jump to content

Cannot Display "Out of stock" or custom message


Recommended Posts

Hi, guys.

 

Before you start telling me that I have to search the forum for answers, I am saying I did, and applied some of the solutions that supposedly worked for some ppl.

 

All I want is to have a message displaying when product is out of stock, the custom one you enter in "Quantities" section when adding/editing a product and a relevant message when product is in stock and can be ordered. None of the messages displays for me, no matter what I have tried.

 

A basic question: Do I need to have Stock management set to OFF if I want to display such messages? What other settings should I have?

 

Thanks in advance,

Peter

Link to comment
Share on other sites

Hello vekia,

 

this is my stats screen from my prestashop:

 

Server information

Server information: Linux #1 SMP Thu Mar 7 15:58:33 EST 2013 x86_64

Server software version: Apache

PHP version: 5.4.15

Memory limit: 128M

Max execution time: 30

Database information

MySQL version: 5.5.31-log

MySQL engine: InnoDB

Tables prefix: brc_

Store information

PrestaShop version: 1.5.4.1

Link to comment
Share on other sites

  • 2 weeks later...

The theme I am using was purchased through templatemonster. The author apparently forgot to add the "availability" part of code to the product.tpl file of his template. Switching to the default presta template, I was seeing the "availability" status block showing clearly on the product page. Switching to templatemonster tpl, the block disappeared.

 

So I copied the following block of code from the default presta tpl to mine under the size/color selection section:

 

 



<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
<span id="availability_label">{l s='Availability:'}</span>
<span id="availability_value"{if $product->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}
</span>
</p>

 

Where you will put the code actually depends on the structure of your template.

 

Regards,

Peter

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...