Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change button on product info page


kalkal

Recommended Posts

Assuming you are using 2.3.1, and assuming you have a stock product_info.php

 

on line 194, change the part that says:

tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary')

 

to read:

tep_draw_button(IMAGE_BUTTON_IN_CART, '', null, 'primary')

 

that will remove this little image infront of the words "Add to Cart"

 

if you are looking to change the words, then edit includes/languages/english.php (or whatever language you are changing, and...

 

on line 199, change the last part 'Add to Cart' to whatever you want..

so...

define('IMAGE_BUTTON_IN_CART', 'Add to Cart');

 

becomes

define('IMAGE_BUTTON_IN_CART', 'I changed it');

Link to comment
Share on other sites

Assuming you are using 2.3.1, and assuming you have a stock product_info.php

 

on line 194, change the part that says:

tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary')

 

to read:

tep_draw_button(IMAGE_BUTTON_IN_CART, '', null, 'primary')

 

that will remove this little image infront of the words "Add to Cart"

 

if you are looking to change the words, then edit includes/languages/english.php (or whatever language you are changing, and...

 

on line 199, change the last part 'Add to Cart' to whatever you want..

so...

define('IMAGE_BUTTON_IN_CART', 'Add to Cart');

 

becomes

define('IMAGE_BUTTON_IN_CART', 'I changed it');

 

 

So i guess i should have said i am using version 2.2

The button is actually an image that i wanted to change to plain text...

 

 

Kurt

Link to comment
Share on other sites

Sound like you dont need shopping cart software, and should be using something else....

 

at any rate... line 213, change this part of the line

tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART)

 

to whatever text you want. ie this

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

becomes this

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . my pointless text here; ?></td>

Link to comment
Share on other sites

Sound like you dont need shopping cart software, and should be using something else....

 

at any rate... line 213, change this part of the line

tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART)

 

to whatever text you want. ie this

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

becomes this

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . my pointless text here; ?></td>

 

actually thats not right. the words you put in there....need to be inside qoutes... so . 'my pointless text here';

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...