X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Availability information in Product page (https://forum.x-cart.com/showthread.php?t=42368)

ADDISON 09-15-2008 11:13 AM

Availability information in Product page
 
I would like to insert AVAILABILITY information in product page. This must be based on the number of items in stock.

Here is an example:

If (items in stock >5) to place in product page this text: "Availability: in stock".

If (items in stock between 1 and 5) to place this text: "Availability: limited".

If (items in stock = 0) to place this text: "Not in stock".

THANKS

Yurij 09-16-2008 12:26 AM

Re: Availability information in Product page
 
Use this code:

PHP Code:

{if $config.General.unlimited_products ne "Y" and $product.distribution eq ""}
{if 
$product.avail gt 5}
        
Availabilityin stock
    
{elseif $product.avail gt 0}
        
Availabilitylimited
    
{else}
        
Not in stock
    
{/if}
{/if} 


ADDISON 09-16-2008 08:29 AM

Re: Availability information in Product page
 
Thanks. It worked.


All times are GMT -8. The time now is 10:38 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.