programming for shopping cart

Question
I finally got my Mal's shopping cart to work. Thanks for the help.
Now I have 2 other, related, problems. When I enter a value in quantity, it only calculates 1, no matter what value I put in. I can change that in the cart, but I wouldn't want to rely on my buyers knowing they have to change the value there and getting mad if I shipped 1 of something they wanted 5 of.
The other problem is that I cannot click the Buy Now button to go to the shopping cart. I *can* click on the quantity button and it goes there.
I really want to get this done because I would LOVE to work through the info Jayne is putting up. But I HAVE to get my site functioning properly first.
Here is the code I'm using - I'm not sure it this is what you need to see, or you want to go to the website HERE to check it out.
Quantity:<input name="quantity" type="text" id="quantity" size="5" /><br />
<input name="Submit" type="submit" class="button" value="Buy Now" />
Thanks for any help.
Gina

Answer
First, a caveat, I don't have a database driven site.
Here's the EXACT code I use C&P from one of the item pages at one of my websites:
<form>
<input type="hidden" name="userid" value="(removed)">
<input type="hidden" name="product" value="(name of the item)">
*<input type="hidden" name="noqty" value="2">*
(yours won't have this line, as it limits quantities to ONLY ONE!)
<input type="hidden" name="price" value="30">
<input type="hidden" name="return" value="http://www.abesilverman.com">
<input type="hidden" name="units" value="450">
<input type="image" src="http://www.abesilverman.com/files/Buy_Now_Button.gif" height="53" width="200">
</form>

Answer
Just a guess, because I don't know this shopping cart and less than nothing about PHP, but where you have
HTML Code: <td><a href="http://ww8.aitsafe.com/cf/add.cfm?userid=********product=CGM direct box&price=29.99&return=www.strummersmusic.com/catalog.php"> Quantity:<input name="quantity" type="text" id="quantity" size="5" /><br /> <input class="button" type="submit" name="Submit" value="Buy Now" /> you might change the <a href= to <form action=, like this
HTML Code: <td><form action="http://ww8.aitsafe.com/cf/add.cfm?userid=*********&product=CGM direct box&price=29.99&return=www.strummersmusic.com/catalog.php"> Quantity:<input name="quantity" type="text" id="quantity" size="5" /><br /> <input class="button" type="submit" name="Submit" value="Buy Now" />

Answer
Hi Kathleen and Jayne,
I used both your suggestions. Jayne, I switched to Form and Kathleen, I looked at how your code is and modified it to mine.
I'm getting closer, but still not there yet.
I finally got it to click on the buy button and not quantity. I'm not sure which solution solved that. But I'll accept it.
I still can't seem to get more than 1 quantity.

Answer
Well, I can't figure this out for you because it's probably in the instructions for the software somewhere, but here's what I can see.

In the product detail page it says:
HTML Code: Quantity:<input name="quantity" type="text" id="quantity" size="5" /><br /> On the order page, it says:
HTML Code: <font face="Arial" size=2>Deering Gig Bag, for Openback banjo</font> </td> <td align=center valign=bottom><input type=text name="itemquant1" value="1" size=6 maxlength=10> </td><td align=right valign=bottom><font face="Arial" size=2>95.00</font></td> <td align=right valign=bottom><font face="Arial" size=2>95.00</font></td></tr> <tr><td><font face="Arial" size=2>Deering Gig Bag, for Openback banjo</font></td> <td align=center valign=bottom><input type=text name="itemquant2" value="1" size=6 maxlength=10> Notice the value="1"?
That means it will always display the quantity as 1.
But if you look at the names, in the product detail page the name is "quantity" and in the order page the name is "itemquant1" and "itemquant2" etc. Somewhere in the code it's moving the value of "quantity" to "itemquant".

It may be that you don't need to know exactly what it's doing. You might try removing the "value=1" on the order page and see what happens. Look very carefully at what happens to your totals and shipping charges, though.

Answer
Thanks for the help, Jayne & Kathleen!
Actually, what I finally did is took out the quantity box altogether. I did see that '1' value, but I changed it to all different things and that didn't change anything. Then, it *finally* dawned on me that I don't need a quantity value there. If I just have a "buy now" button that takes them to the cart, they can enter the value there. I can't believe I didn't think of that earlier.
Now I have to figure out how shipping works
Right now I have added shipping in to all my items, but I don't want it to stay that way. I'm taking a break for now though.
Thanks again

Answer
Congrats! It's looking good.

Answer
Thanks Jayne!
Thanks for all the time you're putting in here. I know I really appreciate it and I'm sure others do to.


Answer
<form>
<input type="hidden" name="userid" value="(removed)">
<input type="hidden" name="product" value="(name of the item)">
*<input type="hidden" name="noqty" value="2">*
(yours won't have this line, as it limits quantities to ONLY ONE!)
<input type="hidden" name="price" value="30">
<input type="hidden" name="return" value="http://www.abesilverman.com">
<input type="hidden" name="units" value="450">
<input type="image" src="http://www.abesilverman.com/files/Buy_Now_Button.gif" height="53" width="200">
</form> personal suggestion take the line that you are told you wont have in this code and change the noqtyvalue from 2 to 3
if that lets you enter 2 items then change it to whatever maximum you want
© 2007 www.aqcollection.com | Contact us |