Is it possible to use Logic on Inventory Amounts

General ShopSite user discussion

Is it possible to use Logic on Inventory Amounts

Postby bucolic » Thu Jan 22, 2009 7:58 am

Hi,

I currently use the following setup to display Inventory amounts in stock on select items by adding something to Product field 6:

[-- IF PRODUCT.Field6 --] ([-- ProductInventoryActual /path_to_your/sb "In Stock:" --]) [-- PRODUCT.Field6 --] [-- ELSE --][-- PRODUCT.Field9 --] [-- IF PRODUCT.Field8 --][-- PRODUCT.Field8 --][-- END_IF --] [-- END_IF --]

What I was wondering is if you could use logic that says if the Inventory of the item is greater than 20 then show 20+, else show actual inventory.

Thanks!
************************
Using Shopsite 12:Pro
Hosted By Lexiconn
************************
bucolic
 
Posts: 20
Joined: Sat Jun 23, 2007 12:09 pm

Postby Jim » Thu Jan 22, 2009 8:31 am

There is no greater than or less than in the IF conditional, you can only compare if something is equal. So you could use 20 if statement comparing the quantity to 1, 2, 3,4, 5, 6, etc up to 20 but that really would be a lot of coding.

If you want to put a value in product field 6 and compare against that value you could do that by using a specific value for example "Lots" then you would do your if like this
[-- IF PRODUCT.Field6 "Lots" --]
do your stuff
[-- ELSE --]
or do something different
[-- END_IF --]

In most cases just using [-- IF <some value> --] by itself will not work. You must usually make it a comparison [-- IF <some value> <some value> --]
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 117 guests