Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

In Cart redirect to product_info.php code


wdyck

Recommended Posts

If one is on the new products page and sees a product they would like to purchase they can select the "In Cart" button. If the product has no attributes it will go right into he users cart, however, if the product has attributes the user is redirected to the product_info page for the product so they can select any extra attributes, accessories, etc. They can then select the "In Cart" button and the product will be added to the cart.

 

Does anyone know off-hand where the code is that handles this redirection? If someone could point me in the right direction it would help a lot.

 

Thanks much.

 

~Wayne

Link to comment
Share on other sites

line 296 of catalog/includes/application_top.php

 

case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {

                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products$

                               } else {

                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products$

                               }

                             }

                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

                             break;

Link to comment
Share on other sites

Thanks Mike! I actually just found it and was coming back to post a quick update. I was looking at the pages asking myself, "what are the includes I have not looked at yet?" I have accessed application_top.php many times before but always to add or change variables...never looked farther down the page.

 

Thanks again!

 

Cheers.

 

Wayne

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...