Jump to content

Show a diiferent message when out of stock and allow orders & not allow orders


MarcoVan

Recommended Posts

Hi,

 

I am breaking my b.lls here :-).

 

In product.tpl of PS 1.6.0.14 default theme:

{if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)}
                <!-- number of item in stock -->
                <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}>
                    <span id="quantityAvailable">{$product->quantity|intval}</span>
                    <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='stuk op voorraad voor directe bestelling. Voor 17:00 besteld, morgen in huis!'}</span>
                    <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='stuks op voorraad voor directe bestelling. Voor 17:00 besteld, morgen in huis!'}</span>
                </p>

 

This will show me a message when 1 or more products are on stock. It will hide the message when not on stock. I want to go further.

 

I want to show this in the 'box-info-product'. When someone changes the attributes it will show the actual stock of that attribute. Furthermore i would like the following:

  • When on stock show message
  • When not on stock and allow order show message telling we will order in a week
  • When not on stock and not allow order show message telling this product will not be available anymore. (as long as this product is still showing in webshop, sometimes there are products sold out and we forget to hide this)

I know it will be a small step for expert developer, I am just starting to get a grip on PS code.

 

Cheers

 

Marco

Edited by MarcoVan (see edit history)
Link to comment
Share on other sites

I think this is already possible.

 

When you set the system defaults in such a way that checkout is not allowed when there is no stock anymore, there are two messages: 'on stock' and 'not on stock'.

The product cannot be bought when there is no stock anymore.

 

Per product you can make a difference by allowing checkout even if there is no stock and you can add a message for both on stock and not on stock situation.

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