antoniamar Posted February 17, 2006 Posted February 17, 2006 A few items in my catalog have very detailed descriptions. I would like the Add to Cart button to be available at the top of the page as well as the bottom. Anyone know how?
Celebrimbor Posted January 22, 2007 Posted January 22, 2007 A few items in my catalog have very detailed descriptions. I would like the Add to Cart button to be available at the top of the page as well as the bottom. Anyone know how? I want to know too? Anybody knows? Rafa OScommerce Rocks!
andytc Posted January 22, 2007 Posted January 22, 2007 Modify product_info.php Look for these lines near the bottom . This is from a fresh install <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <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> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> The bit you want for the buy now or add to cart is this line- <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> Just place that where you want it at the top of product info php , you can put a seperator before and after it eg - <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <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> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> Just experiment with it's placement , a good place is after the product name and before the price. Just change the align right to left if you need to. Back-up product_info before you mess around with it and make sure where you place it doesn't break your layout.
Celebrimbor Posted January 22, 2007 Posted January 22, 2007 Modify product_info.phpLook for these lines near the bottom . This is from a fresh install <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <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> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> The bit you want for the buy now or add to cart is this line- <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> Just place that where you want it at the top of product info php , you can put a seperator before and after it eg - <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <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> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> Just experiment with it's placement , a good place is after the product name and before the price. Just change the align right to left if you need to. Back-up product_info before you mess around with it and make sure where you place it doesn't break your layout. Nice Andy... I will test, but you know if is possible insert two buttons, one on top and another on bottom using your method? Tx in advance.. OScommerce Rocks!
andytc Posted January 22, 2007 Posted January 22, 2007 Yes, it's easy , just leave the bottom one in place and place a copy at the top. it works fine. If all your descriptions are long then lt looks ok , but if you have any products that have a very short description then it can look a bit odd , as you will have a buy now buton , then a few lines of text , and another buy now button.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.