Jump to content
Sign in to follow this  
montyrach

Gift Registry for 2.3.1

Recommended Posts

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 montyrach@gmail.com 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


Rachel M.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 ?


Rachel M.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×