PDA

View Full Version : FOr some items, how do I suppress "Quantity on hand"?


pharry
30-Oct-2003, 11:56 AM
I am now displaying the quantity on hand for my products (thanks to help from this board). Now, how to I NOT display this on some of my items? I do not want to display this information for products that are not for sale. I need an IF statement - If product is not for sale ("Can be ordered online" is NOT checked), then I don't want to display the quantity on hand field.

I have set up some products under one section that reference the saleable product in another section. For the referrer product, I don't want Quantity On Hand = 0 displayed, because then it looks as if there aren't any available. In reality, if you go to the saleable product, there are plenty on hand. I hope this makes sense.

Thanks!

Pat

rmladden
30-Oct-2003, 12:43 PM
I don't know what you have done, but perhaps you can move that code to the add to cart template so it will only be displayed when the item is actually for sale. You may also consider moving it to the price template.

pharry
30-Oct-2003, 12:55 PM
Thanks for the suggestion. I'm almost there! I've added it to the price template, but now it displays on the screen as "Approximate quantity on hand: NETQUOTEVAR:STOCKLEVEL", instead of "Approximate quantity on hand: 10".

What have I left out?

Pat

pharry
30-Oct-2003, 01:08 PM
Here is what I've done, if that helps. The very first item, the book, is simply a reference to the "real" product where it can be purchased. I don't want the quantity to display on the page where it can't be purchased.

http://www.apeekintoyesterday.com/acatalog/Laura_Ashley_Blue_Collection.html

Pat

rmladden
30-Oct-2003, 04:55 PM
I don’t know which NETQUOTEVAR’s work in which templates. Another idea is to have a javascript in each product section to check for the presence or value of the quantity field,
<INPUT TYPE=text NAME="Q_EK-LAJB008" SIZE="4" VALUE="0">
Then if the field exists the script can write your message. You would have to store the stock value in a hidden field for the script to retrieve.

That’s my theory. It would take me hours to get it to work (if it ever could work).

pharry
30-Oct-2003, 05:10 PM
You've just gone way beyond my skills! It might take you hours, but it would take me light years!! I guess I'll have to live with what I have. Thanks very much for your help.

Pat

rmladden
30-Oct-2003, 05:53 PM
See page 16 of the AUG. If you modify the script to display null if the stock=0 then you would have what you want. If stock=0 for a real product then the out of stock message would display anyway.

pharry
30-Oct-2003, 06:06 PM
That sounds like it would be just what I need. I have a business license, not a developer license. Do I have access to the AUG? I'm not knowledgeable with scripts. Is this going to be fairly obvious to me? (I do have an IT background, but it's been a while.)

Thanks again. You've been very helpful, and I appreciate it.

Pat

rmladden
30-Oct-2003, 06:18 PM
The AUG is the advanced users guide. It is downloadable from Actinic's web site. It is good reading.

garyhay
30-Oct-2003, 06:20 PM
What you need to do is use a different product line template(one without the quantity refrence) on products where you dont want to show this

pharry
30-Oct-2003, 06:33 PM
Well that was easy! Just need to remember to use the correct template. Definitely safer than me tinkering with the scripts!

Thanks very much for your help.

Pat

rmladden
30-Oct-2003, 07:48 PM
Sure, do it the EASY WAY :D

pharry
30-Oct-2003, 07:58 PM
Yeah, I know. I had to really weigh out what I wanted to do: take the intellectually challenging approach that would be a tremendous growth opportunity for me and expand my horizons... or do it and be done with it. It was a tough call <g>!

Pat

garyhay
30-Oct-2003, 09:30 PM
No probs guys.

We all sometimes cant see the wood for the trees