Zen Cart Logo
Forums / General Questions / Not sure where to put this : Quantity?

Not sure where to put this : Quantity?

Views: 890

Results 1 to 9 of 9
16 Feb 2011, 2:18 PM
#1
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Not sure where to put this : Quantity?

I have my site set to not show many of each item is in stock. I do this purposely as I think it looks "cheap" to show how many are left of an item.

However, I would like it if the site would show how many are in stock if someone wants more than the amount available.

Example:

Someone wants to buy a Phone, I have 10 in stock, they want 20.
So, they enter 20 in the amount of items they want, the site then says "Products marked with * * * are out of stock or there are not enough in stock to fill your order. Please change the quantity of products marked with (* * *). Thank you" - instead, I would like it to tell the person there is 10 available, instead of them trying to guess.

Is there a way to do this?...

17 Feb 2011, 8:22 PM
#2
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

Anyone?

20 Feb 2011, 11:54 PM
#3
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

So..... no one has any clue? :blink:

21 Feb 2011, 12:35 AM
#4
maac2 avatar

maac2

New Zenner

Join Date:
Jan 2011
Posts:
70
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

I do not know the answer, but it's controlled by flagStockCheck, searched the forums and the code posted by ebaobao also includes 'quantity available'. Check this post: https://www.zen-cart.com/forum/showthread.php?p=934782

21 Feb 2011, 12:47 AM
#5
maac2 avatar

maac2

New Zenner

Join Date:
Jan 2011
Posts:
70
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

Actually, AJEH answered this a few years ago (just tested it and works in 139h).
http://www.zen-cart.com/forum/showthread.php?t=105985

21 Feb 2011, 9:19 PM
#6
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

Thanks!!!

That looks like it would work - but where would I put it?......

22 Feb 2011, 4:29 PM
#7
maac2 avatar

maac2

New Zenner

Join Date:
Jan 2011
Posts:
70
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

The code you'll be editing is in tpl_shopping_cart_default.php, which is in your templates folder (if you haven't edited it yet, copy this file into your theme override foler).
Open the file and look for the code Ajeh has edited (you will be amending two existing lines of code). The result will be "Left 3".
This new notice will appear under the quantity box of the product that is unavailable. You could probably move it, but I think it needs to be within the product row. ie not at the top with the warning message.

25 Feb 2011, 4:26 PM
#8
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

Thanks!

Now I have an entirely new problem... something I've never seen in all my time...

When I make the changes, and save the file, the code get's all "squished".... Images below.

http://img713.imageshack.us/g/php1l.jpg/

When I upload it - knowing it wouldn't work - I get a plain white screen at the cart page.

No other file I've done has had this happen to it... any solutions?

28 Feb 2011, 2:02 AM
#9
fett avatar

fett

New Zenner

Join Date:
Feb 2010
Posts:
55
Plugin Contributions:
0

Re: Not sure where to put this : Quantity?

Anyone? Help!! ;)