Arlene_b Posted March 20, 2007 Posted March 20, 2007 I wish to change to layout of the product pages. At the moment there is a text box to the left and the product image to the right. I want to change this to have a large image first and then have the text box underneath. I have been looking at the product_listing.php file but I can't work it out (not even sure if this is the right file!) Does anyone have any suggestions? Thank you for your time. :thumbsup: Also how can I have the price inc vat display only (not the price ex vat)? www.leisuretraders.co.uk
masat Posted March 20, 2007 Posted March 20, 2007 The layout is basic html. If you post the link to the page I will help you with this as long as we are on the same page. I'm sorry but I don't understand your question on the pricing issue but it can be what ever you want it to be. Place a link to show the pricing issue you would like to address. You can be my project for the day. Let's get to work. How do you know when you know what you want to do for the rest of your life?
Arlene_b Posted March 20, 2007 Author Posted March 20, 2007 Hi Tim I have now found out the correct file to edit product_info.php. I have managed to move the image above the text box but now a can't centre align the image (doh). Here is a link to my site http://www.leisuretraders.co.uk As to the pricing question, you will see when you visit the site that it displays the price inc vat and ex vat. I only want the inc vat price to be shown. Any ideas??? I have now found another problem. Is there a way to set the images on the product info pages to a particular size (I want them big) but without changing the thumbnail sizes in the rest of the site (you will notice the images in the side colums are now to big). Thank you, thank you, thank you!!! :lol: www.leisuretraders.co.uk
jasonabc Posted March 20, 2007 Posted March 20, 2007 Is there a way to set the images on the product info pages to a particular size (I want them big) but without changing the thumbnail sizes in the rest of the site (you will notice the images in the side colums are now to big). Find SMALL_IMAGE_WIDTH in /product_info.php (around line 108) and add this on the end: SMALL_IMAGE_WIDTH + 100 This will add 100 pixels onto the width of the product image. Change it whatever you need obviously. You should remove SMALL_IMAGE_HEIGHT right after this to make sure the image is scaled proportionally. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Arlene_b Posted March 20, 2007 Author Posted March 20, 2007 Hi Jason Thank you for your help. Just wanted to double check which bit of code to change. Here is the bit of code from the product_info.php file which says about SMALL_IMAGE_WIDTH <?php if (tep_not_null($product_info['products_image'])) { // prevent resizing of image if main image less than SMALL_IMAGE_W|H *2 $image_size=getimagesize(DIR_WS_IMAGES . $product_info['products_image']); if($image_size[0] < (SMALL_IMAGE_WIDTH*2) || $image_size[1] < (SMALL_IMAGE_HEIGHT*2)){ $width=$image_size[0]; $height=$image_size[1]; } else{ $width=(SMALL_IMAGE_WIDTH*2); $height=(SMALL_IMAGE_HEIGHT*2); } ?> www.leisuretraders.co.uk
Arlene_b Posted March 20, 2007 Author Posted March 20, 2007 Ah! I got it. I have change the *2 which I guess is x2 to a different number and that works great. Thank you very much for your help. Do you know how I can centre the image? I have tried centre tags and have set the td properties to align centre but it is still displaying right aligned. Ta. ;) www.leisuretraders.co.uk
masat Posted March 20, 2007 Posted March 20, 2007 Hi Tim I have now found out the correct file to edit product_info.php. I have managed to move the image above the text box but now a can't centre align the image (doh). Depending on how you set the image into the html you should be able to align="center" ie ,<td align="center"> Here is a link to my site http://www.leisuretraders.co.uk For some reason I cannot access your site right now but I google your site and they had a cached page. As to the pricing question, you will see when you visit the site that it displays the price inc vat and ex vat. I only want the inc vat price to be shown. Any ideas??? I am not familiar with your currency but it appears there is a contrib installed that is doing that. Those price links are pointing to a file called VAT.PHP and I have never worked with that so I am not sure where the two pricing structures are coming from but what ever it is it is going to be on multiple pages. I'll need your help and patience to figure this out. I have now found another problem. Is there a way to set the images on the product info pages to a particular size (I want them big) but without changing the thumbnail sizes in the rest of the site (you will notice the images in the side colums are now to big). Thank you, thank you, thank you!!! :lol: As far as the new image sizes just leave out the size info in the image link. Find something that looks like: SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT or similar and remove it. That should allow you to set your images to full size. If you use a method such as this you will want to presize your images before up load so they will all be of a standard size and shape. How do you know when you know what you want to do for the rest of your life?
masat Posted March 20, 2007 Posted March 20, 2007 Ah! I got it. I have change the *2 which I guess is x2 to a different number and that works great. Thank you very much for your help. Do you know how I can centre the image? I have tried centre tags and have set the td properties to align centre but it is still displaying right aligned. Ta. ;) Here is how I did it in my test store I'm using for your project <!-- ##################################################### --> <td> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name']); ?></td> </tr> </table> <?php } ?> </td> </tr> <tr> <!-- ##################################################### --> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> The code between the #### is what I am looking at How do you know when you know what you want to do for the rest of your life?
Arlene_b Posted March 20, 2007 Author Posted March 20, 2007 Hi Tim I have added a table (see below) but the image is still displaying to the right. <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <?php if (tep_not_null($product_info['products_image'])) { // prevent resizing of image if main image less than SMALL_IMAGE_W|H *2 $image_size=getimagesize(DIR_WS_IMAGES . $product_info['products_image']); if($image_size[0] < (SMALL_IMAGE_WIDTH*3) || $image_size[1] < (SMALL_IMAGE_HEIGHT*3)){ $width=$image_size[0]; $height=$image_size[1]; } else{ $width=(SMALL_IMAGE_WIDTH*3); $height=(SMALL_IMAGE_HEIGHT*3); } ?></td></tr></table> Do you think I should change the resizing code? Thank you. www.leisuretraders.co.uk
masat Posted March 20, 2007 Posted March 20, 2007 No. I still can't get to your site to take a look and I think I know what is happening but I can't know for sure without seeing. Do you still have the product name immediately to the left of your image? How do you know when you know what you want to do for the rest of your life?
Arlene_b Posted March 20, 2007 Author Posted March 20, 2007 That's weird that you can't view it. I don't know why that is happening as I can view it fine. As to your question, no the product name is above. www.leisuretraders.co.uk
bill110 Posted March 20, 2007 Posted March 20, 2007 Just so you guys know, I am able to view the site. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
masat Posted March 20, 2007 Posted March 20, 2007 OK let's do this... Put a border="2" on the table that holds the image. You have your table set to 100% so the border should stretch completely across the page center section. If it does not then you may need to colspan="2" the td that holds the table or there is something in the style sheet that is keeping the image right. I think the issue is the colspan="2" because the table that holds the product name and price is two td's and you say the product name is above the picture. <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> <tr> <!-- ################################################################################ ########## --> <td colspan="2"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name']); ?></td> </tr> </table> <?php } ?> <!-- ################################################################################ ########### --> </td> </tr> </table></td> </tr> How do you know when you know what you want to do for the rest of your life?
masat Posted March 20, 2007 Posted March 20, 2007 Just so you guys know, I am able to view the site. Thanks for the confirm. There must be a router somewhere in my path that is down or some other technical mumbo jumbo going on. How do you know when you know what you want to do for the rest of your life?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.