Jump to content

Archived

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

Guest

Enable Buy Now for Digital goods

Recommended Posts

Guest

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;

Share this post


Link to post
Share on other sites

×