montyrach Posted April 24, 2011 Share Posted April 24, 2011 I'm nearly finished updating an existing Gift Registry contribution for OSC 2.3.1. I have one last issue that I desperately need help with. When I add a product to my registry from the product_info page, the product is entered into the registry but also quantity 1 of that product is put into the cart. I'm fairly certain the issue lies in the below code somewhere. Any help would be much appreciated. Here's a link to my live test area. To view the issue directly, login as [email protected] with password 12171977 and go to My Account. Then click "click here" on the line of the registry to begin registry mode. Go into a product and try adding it to the registry. You'll see it is also added to the cart :( // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : ''; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //start gift registry if($HTTP_POST_VARS['submit_cart_x']){ if($HTTP_POST_VARS['products_quantity_cart']) { $quantity = $HTTP_POST_VARS['products_quantity_cart']; }else { $quantity = 1; } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']); }elseif ($HTTP_POST_VARS['submit_registry_x']){ if($HTTP_POST_VARS['products_quantity_registry']) { $quantity = $HTTP_POST_VARS['products_quantity_registry']; }else { $quantity = 1; } $registry->add_cart($HTTP_POST_VARS['products_id'], $registry->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; //end gift registry Quote Rachel M. Link to comment Share on other sites More sharing options...
gtbr Posted May 5, 2011 Share Posted May 5, 2011 hi, i'm new with oscommerce, and i really want to create a shop with registry in version 2.3.1, i have it working in the old 2.2 version, but i lack the knowlege to make it work in the most recent version. is it possible for you to show how you make it work? thanks Quote Link to comment Share on other sites More sharing options...
montyrach Posted May 18, 2011 Author Share Posted May 18, 2011 hi, i'm new with oscommerce, and i really want to create a shop with registry in version 2.3.1, i have it working in the old 2.2 version, but i lack the knowlege to make it work in the most recent version. is it possible for you to show how you make it work? thanks What sort of issues are you having getting the gift registry to work in 2.3.1 ? Quote Rachel M. Link to comment Share on other sites More sharing options...
gtbr Posted May 22, 2011 Share Posted May 22, 2011 What sort of issues are you having getting the gift registry to work in 2.3.1 ? hi, first i've copied the modified files to 2.3.1, and add the database changes, that didn't work, and i tryed to find the modified changes in the files, but after some time i've gave up. i just don't have the knowledge to do it alone. did you fixed your problem? thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.