Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy It Now button


altermate

Recommended Posts

There is already an Add to Cart button. All you need to do is make a copy and rename the copy. The real question is, what do you want to happen when you click the new button? I believe there are different functions for 'buy now' and 'add to cart' and changing the image of the button is not going to change what happens when you click on it.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Just go to the page ( in this case product_info.php) where the button is and change:

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW); ?>

 

to this:

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

 

 

On a vanilla install the 'button_buy_now.gif' is the 'buy now' image and and the IMAGE_BUTTON_BUY_NOW refers to the text on top of the button 'buy now' (if you are using the text, which many people don't- delete the 'button_buy_now.gif' and watch what happens.)

 

'in_cart.gif' is the 'add to cart' button.

 

Changing the above does not change the function of the button at all. You are free to make up your own buttons and substitute their names if you like.

 

The functionality of the button is in the 'tep_draw_hidden_field' phrase in the first half of the line, and in the 'tep_draw_form' command which will be located at the top of the page.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...