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)
-   -   Modifying smarty variables. Specifically, $product.avail (https://forum.x-cart.com/showthread.php?t=18374)

Smalls 12-02-2005 03:26 PM

Modifying smarty variables. Specifically, $product.avail
 
Can anyone tell me how to modify $product.avail?

Specifically, I want to modify the value of it before another line is executed in product.tpl (customer/main/product.tpl).

For example:
{$product.avail = 7}
{if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''}

that way, when the 2nd line began to execute, it would see that $product.avail is greater than 0 and continue.[/b]

shan 12-03-2005 05:12 AM

are you trying to make the avail always = 7 ?

try and explain more

Smalls 12-03-2005 10:29 AM

well i was trying to make a simple code that checked if the product.avail was 0, then make it 1, so people could order out of stock products, but i've found somewhat of a workaround and allowed backordering to occur

More details on the backorder mod here:
http://forum.x-cart.com/viewtopic.php?p=116961#116961


All times are GMT -8. The time now is 11:31 AM.

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