Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Gift Registry for 2.3.1


montyrach

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 [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

Rachel M.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...