Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product reviews info site looking "wide"


DennisMAX

Recommended Posts

Can you find this code in your product_reviews_info.php

 

<?php
 if (tep_not_null($review['products_image'])) {
?>
 <div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+20; ?>px; text-align: center;">
   <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $review['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $review['products_image'], addslashes($review['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>
   <p><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now')); ?></p>
 </div>
<?php
 }
?>

 

I see on yours it is:

 

<div style="float: right; width: 20px; text-align: center;">

 

So width is set too small to house the image and add to cart button inside it. See how in the original code the <div> width is set to width: <?php echo SMALL_IMAGE_WIDTH+20; ?>px;

 

Is SMALL_IMAGE_WIDTH defined in your admin section?

Matt

Link to comment
Share on other sites

@@mattjt83 I set the small image width in admin section to nothing because otherwise my small pictures are looking "stretchy"

 

This is my code in product_reviews_info.php

<?php
 if (tep_not_null($review['products_image'])) {
?>
 <div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+20; ?>px; text-align: center;">
   <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $review['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $review['products_image'], addslashes($review['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>
   <p><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now')); ?></p>
 </div>
<?php
 }
?>

Link to comment
Share on other sites

@@DennisMAX The button text does not have enough space apparently with the set width so it is wrapping around making the button look strange. You could edit the product_reviews_info.php code and give it a little more space and see if it helps.

 

<div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+38; ?>px; text-align: center;">

Matt

Link to comment
Share on other sites

ok, this is the button, there is not enouch place under the image for the large button text

 

2 options

 

1) make images wider. Right now you have 80 pixels, make it e.g. 120 pixels for the width

 

2) Find following code in file product_reviews_info.php

<div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+20; ?>px; text-align: center;">

 

change to

<div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+50; ?>px; text-align: center;">

 

What is changed is SMALL_IMAGE_WIDTH+50

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...