aftabn10 Posted October 25, 2014 Share Posted October 25, 2014 Hi, i was just looking for some help in regards to adding a buy now and product info button on the index.php (within the new products for the month section). I have managed to add the following code which replaces the tep_draw_button (as shown in product_info.php) as i wanted to add 2 custom images: <a href="' .tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . '<img src="images/button_add_to_cart2.gif" border="0" alt=" " />' . '</a><a href="' .tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . '<img src="images/button_details2.gif" border="0" alt=" " />' . '</a> to the new_products.php file after the following bit of code: $new_prods_content .= '<td width="33%" align="left" valign="top"><h3><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></h3><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><p class="price-text">OUR PRICE:<p class="price"> ' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</p></p> I just want to make sure the code I have written is correct as it works as required, but thought I would get the experts opinion to make sure im going about it the right way. Thanks in advance. Link to comment Share on other sites More sharing options...
aftabn10 Posted October 27, 2014 Author Share Posted October 27, 2014 Apologies, also the other reason was that I would like to use custom buttons on other pages and just wanted to make sure the code above is sufficient and nothing gets broken. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.