Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Button for purchase, don't like "buy now"


cczernia

Recommended Posts

I decided to remove the "buy now" button because in general it is important for our customers to see the description of the items whether it has options or not.

 

As a result I bolded the text hoping this would be enough to convince the customers that they have to click on the item. It isn't. Every now and than we get a call with a customer stuck on the product listing page wondering what to do next. I'm thinking a "click here to purchase" button would help but I'm not sure how to place it or how to fix the "buy now" button so it always goes to product_info.

 

Any suggestions would be great. Thanks in advance.

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

just look at your index.php, search for something similar to

echo '<img src = buy_now.gif>' or something to the same effect, remove that line.

simple as that.

with very basic php and html knowledge you should be able to fix it. good luck!

 

I decided to remove the "buy now" button because in general it is important for our customers to see the description of the items whether it has options or not.

 

As a result I bolded the text hoping this would be enough to convince the customers that they have to click on the item. It isn't. Every now and than we get a call with a customer stuck on the product listing page wondering what to do next. I'm thinking a "click here to purchase" button would help but I'm not sure how to place it or how to fix the "buy now" button so it always goes to product_info.

 

Any suggestions would be great. Thanks in advance.

Link to comment
Share on other sites

just look at your index.php, search for something similar to

echo '<img src = buy_now.gif>' or something to the same effect, remove that line.

simple as that.

with very basic php and html knowledge you should be able to fix it. good luck!

 

Thanks but I'm not trying to replace the "buy now" button. I've already removed the "buy now" button which you can do in under Configuration/Product Listing/Buy Now Column = 0. I want to change the functionality of the "buy now" button so it always goes to product_info.php or have a new button next to the product name.

 

The PHP that lists the products in index.php seems really complicated and I couldn't figure out how to edit it.

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

change the buy_now case in application_top.php just replace

 

	  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_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_params($parameters)));
						  break;

 

with

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
break;

Link to comment
Share on other sites

Thanks a ton. It didn't quite work but it pointed me in the right direction. There is an "if" statement in the cade that you need to keep so I commented out the right lines and it worked.

 

  // 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['products_id'])) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, '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_params($parameters)));
						  break;

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...