EPStore Posted June 1, 2011 Share Posted June 1, 2011 Hey all, How would you go about changing this code so as to be able to show a picture for "Add to cart" instead of some unattractive words? (This is for my products page) <div class="buttonSet"> <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'); ?></span> I've tried to do it myself (with tep_image_button)... but then I can't click the picture and add an item to the cart anymore. Link to comment Share on other sites More sharing options...
EPStore Posted June 1, 2011 Author Share Posted June 1, 2011 Here's a little up so that my question doesn't disappear :) Link to comment Share on other sites More sharing options...
mhsuffolk Posted June 2, 2011 Share Posted June 2, 2011 I use this code after the "Click to enlarge" code for the photo <TR><td align="center" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> It can also go at the foot of the product page thus. Around about line 223 <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> Martin Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions. Link to comment Share on other sites More sharing options...
EPStore Posted June 2, 2011 Author Share Posted June 2, 2011 I use this code after the "Click to enlarge" code for the photo <TR><td align="center" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> It can also go at the foot of the product page thus. Around about line 223 <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> Martin That did it! Had to use the "tep_image_submit" instead of the "tep_image_button" function as I thought... Thanks a lot, Martin!! Link to comment Share on other sites More sharing options...
islandgeek Posted November 26, 2011 Share Posted November 26, 2011 Hi Martin, is there a way this can be implemented in products_new.php , I tried just replacing the line in products_new.php with the above but the button does not click to add to cart? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.