Jump to content



Latest News: (loading..)

- - - - -

Add Extra Add to Cart Button just under product name and price


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1   zeemedia

zeemedia
  • Members
  • 1 posts

Posted 09 November 2011 - 07:41 PM

Simple change to catalog/product_info.php will add Reviews button and Add to Cart button on the top of the product description, just like on this site: trioka.net

FIND (around line 57):

  <div>
  <h1 style="float: right;"><?php echo $products_price; ?></h1>
  <h1><?php echo $products_name; ?></h1>
</div>

ADD BENEATH:

  <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>
	<?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>
  </div>


Hope it will be useful.
I have tried to just add Add to Cart button to that position, but when I remove part of the code for reviews - product description and images position gets messed up. So I left it like this, with Reviews button on the top as well.

Please post here if anyone come up with the solution.

Edited by Jan Zonjee, 10 December 2011 - 09:00 AM.

Outside links are not allowed in signatures.

#2   fernandes

fernandes
  • Members
  • 12 posts

Posted 02 February 2012 - 04:54 AM

Removed the echo comand in the second string, that should leave you with one review botton
php echo tep_draw_button(IMAGE_BUTTON_REVIEWS .
mlblock