Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing quantity not possible if product has attributes


Guest

Recommended Posts

Posted

Could someone please take a look at this page

 

www.montessori123.com

 

and add these 2 products to the cart, then try to change quantities: the one with options cannot have its quantity changed (either from cart page, or from product page) the one without option can.

 

Any similar experiences?

 

Thanks!

Posted
check over the product attributes - they may be set up incorrectly.

 

Thank you for taking the time to take a look.

I attached a screen shot of the attributes section. Let me know if there is anything wrong with this (I don't think so, but who knows :-)

 

http://www.montessori123.com/adminscreenshot.gif

 

Thanks

Posted
check over the product attributes - they may be set up incorrectly.

 

After digging a litle bit, it looks like it's a PHP bug :-)

I went to application top where the update cart functions are managed:

 

 // customer wants to update the product quantity in their shopping cart
  case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
							if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
							  $cart->remove($HTTP_POST_VARS['products_id'][$i]);
							} else {
							  if (PHP_VERSION < 4) {
								// if PHP3, make correction for lack of multidimensional array.
								reset($HTTP_POST_VARS);
								while (list($key, $value) = each($HTTP_POST_VARS)) {
etc....

 

and changed it to

 

   if (PHP_VERSION <5) {

 

and it works! I read in another forum that arrays were truncated by 4 characters on the left, that might be the reason

 

The only little problem that remains, and my next question would be: is it possible to add several options of the same product in one cart. My fix doesn't seem to be OK with that :-) it sticks to ONE option

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...