Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

submitting an image


metricbikes

Recommended Posts

<input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif?osCsid=93c3c3e33f7233d8f43690c3d4b4c5b9" border="0" alt="Add to Cart" title=" Add to Cart ">

 

Is there anyway to determine where this image is 'submitted" as far as php code? I am trying to change what shows after you hit the button_in_cart image.

 

Thanks in advance.

 

Steve

Link to comment
Share on other sites

OK, I'll help you out a bit more, as the logic is kinda confusing:

The actual adding of the item is performed in application_top.php. if you find this code:

 

 

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

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

break;

 

 

You will see that product_info.php actually posts to itself - look at this line:

 

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

 

And the "action=add_product" is detected in application_top (which is the required include at the top of this file).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...