Jump to content


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


How to change IMAGE_BUTTON_IN_CART button link

Recommended Posts



I would like to change the link on product_info.php, I don't want the IMAGE_BUTTON_IN_CART button link to /shopping_cart.php


    <span class="buttonAction">
<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); 


I want this button link to "product_url" from products_description table in database


I have checked every where and I dont find it.


Thanks for your help


Share this post

Link to post
Share on other sites



The newer versions of osCommerce no longer have the code on the product_info.php page that shows the products_url - why they have removed it I dont know because the query on the product_info.php page includes the products_url - so basically its getting information from the database that it is  not even going to show on the page.


If you dont intend showing the products_url  on the product_info.php page I would suggests removing it from the query.


If you would like to show the products_url on the product_info.php page you will need to add this code to the page.

    if (tep_not_null($product_info['products_url'])) {

        <div><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></div>



You can remove the buy now button completely and then style the above code to resemble a button

"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Share this post

Link to post
Share on other sites