Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Enable Buy Now for Digital goods


Guest

Recommended Posts

I created a product and the Buy Now works great for the product until I assign an attribute for the download. Once I do this the Buy Now button takes me to product_info.php instead of directly adding the product to the cart.

 

Anyone know where to make the change for this?

 

Can I make this change in the appliction_top.php?

 

From this:

 // performed by the 'buy now' button in product listings and review page
  case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
							if (tep_has_product_attributes($HTTP_GET_VARS['pro
ducts_id'])) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_IN
FO, 'products_id=' . $HTTP_GET_VARS['products_id']));
						   } else {
							  $cart->add_cart($HTTP_GET_VARS['products_id'], $
cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_pa
rams($parameters)));
						  break;

 

to This:

	  // performed by the 'buy now' button in product listings and review page
  case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
							if (tep_has_product_attributes($HTTP_GET_VARS['pro
ducts_id'])) {
							  //tep_redirect(tep_href_link(FILENAME_PRODUCT_IN
FO, 'products_id=' . $HTTP_GET_VARS['products_id']));
							  $cart->add_cart($HTTP_GET_VARS['products_id'], $
cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
							} else {
							  $cart->add_cart($HTTP_GET_VARS['products_id'], $
cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_pa
rams($parameters)));
						  break;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...