Multi-product Add to Cart and Quantity Pricing Group

General ShopSite user discussion

Multi-product Add to Cart and Quantity Pricing Group

Postby drigler » Fri Apr 10, 2009 10:19 am

I am having some problems with our ‘single-page’ order form. (This is the first of two I am posting.) After you specify the products and quantities you want, then click Add to Cart, the resulting shopping cart does not reflect the correct quantities. My test cases are so far consistent in that the quantities are incorrect for the products which are connected to a Quantity Discount Group (which are most of our products). Please use the following link to view this problem: http://www.jewishcard.com/shopping/Sing ... rTest.html
The products that are NOT connected to a Quantity Discount Group are those listed under “Money Cards”, “Passover”, “Wrap Packs”, and the ‘Assorted Collections’ under “Hanukkah”. Anytime I choose ONLY those products, those quantities seem to process correctly. Anytime I add products from a Quantity Discount Group, the quantities do not process correctly. Is this a known limitation of single-page order forms, or am I doing something wrong? If anyone can help, I’d greatly appreciate it. Note: It is not necessary to “Checkout” to view this; just add products and quantities from the order form, then click “Add to Cart”. I am using the standard code:
<form name="OrderForm" action="http://www.jewishcard.com/shopsite/sc/order.cgi" method=post>
<input type=hidden name=storeid value=[our store id]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>

<input type=image src="media/addtocart.jpg" hspace=3 vspace=3 align="top" name="Add_to_Cart" alt="Add to Cart">

Followed by a series of:

<input type=checkbox name="itemnum" value=39>
<input type=text size=2 name="39:qnty" value=5>

And finally:

</form>

Thanks!
Last edited by drigler on Fri Apr 10, 2009 10:41 am, edited 1 time in total.
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Postby Jim » Fri Apr 10, 2009 10:32 am

That link give a page not found error. Is the page still active?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby drigler » Fri Apr 10, 2009 10:42 am

Yes, sorry. Remove the period at the end of the link. I updated the original message.
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Postby Jim » Fri Apr 10, 2009 1:31 pm

I compared your code to the sample code and it looks similar. Maybe all of the table tags (table, td, tr etc) cause a problem with the form.

I would try creating a page with just 2 items assigned to it so there isn't so much code to work with and see if you can isolate the problem.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Jim » Fri Apr 10, 2009 1:34 pm

Another thought. If you have duplicate items on the page it may be using the quantity field from the unchanged one instead of the one that was changed. Make sure you don't have duplicate items in the same form.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby drigler » Fri Apr 10, 2009 3:11 pm

I scaled it down to just a few products. Top categories are tied to a Quantity Pricing Group, bottom two are not. If you click every box (I used 1-8 for quantities) and Add to Cart, some of the quantities are incorrect - in particular the ones tied to a Quantity Pricing Group. (You might have to refresh your form to view the updated one I just put out there.)
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Postby Jim » Fri Apr 10, 2009 3:40 pm

I tried just the top of each group, just the bottom of each group and all of them and every time it added the correct number of items to the cart for each product.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby drigler » Fri Apr 10, 2009 5:36 pm

We've found a consistent test case where it breaks. Four of us have tried it on 4 different computers running IE and Firefox. Please try one more time using these figures: check all boxes and use the quantities 1-8, the first box being 1 and the last being 8.
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Postby dortchjm » Fri Apr 10, 2009 6:08 pm

I tried the test 1-8, the fourth one says "5" instead of "4". At first I thought maybe there was a minimum set in the 4th item as the same result happened when I tried putting "2" in all quantities.

Janice
dortchjm
 
Posts: 119
Joined: Tue Jan 29, 2008 9:24 pm

Postby Jim » Fri Apr 10, 2009 6:35 pm

If i do that then the 35-102 Bat Bright and 80-101 $ Kid products end up with the same value in the cart. (is there any special relationship between these products?)
If I then add the same items only in reverse order then the value in the cart corrected itself. Don't ask me how that happened!!!

I would try using " " around all of the values in the input string
<input type=checkbox name="itemnum" value="258"></td>
<input type="text" size="2" name="258:qnty" value="5"></td>

So that it is correct html and see if that makes a difference.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby dortchjm » Fri Apr 10, 2009 6:46 pm

Try running this page through the W3C Markup Validation Service. I just tried it and found a couple of errors, who knows, I've had weirder things not make code work.

One error right before you start listing the checkbox items says <td valign="center"> is bad, can't use "center", must use "middle".

http://validator.w3.org/

Janice
dortchjm
 
Posts: 119
Joined: Tue Jan 29, 2008 9:24 pm

Postby drigler » Fri Apr 10, 2009 8:08 pm

I uploaded a very stripped down version of the same code using both your suggestions, but still no luck. I double-checked the product codes and the Quantity Pricing Groups, and made sure the top 4 products have the same group, the "Use Quantity Discount" boxes are checked, etc. The bottom 4 do not have a group association. The HTML passes the W3C validation.
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Postby Jim » Fri Apr 10, 2009 8:23 pm

If you uncheck the quantity pricing does it still give the same results in the cart?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby dortchjm » Fri Apr 10, 2009 8:29 pm

Weird, sometimes it works, other times not. Bat Bright doesn't always move correct quantity to the cart.

Code looked fine. I'd add quotes around "text" and "checkbox" to be consistant, but I doubt that is causing the problem.

I would compare all product data fields, possibly download your database to a spread sheet, then delete all records except for these 8 and see if there is anything obvious that stands out. I know the Quanity Price Table can get tricky and sometimes a hidden character will get stuck that won't be obvious when you compare in ShopSite Back Office.

Janice
dortchjm
 
Posts: 119
Joined: Tue Jan 29, 2008 9:24 pm

Postby drigler » Fri Apr 10, 2009 11:59 pm

I unchecked the Quantity Pricing, and it worked fine.
drigler
 
Posts: 14
Joined: Sun Jan 11, 2009 1:47 am

Next

Return to User Forum

Who is online

Users browsing this forum: No registered users and 132 guests