Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change the layout in product_info.php??


Rob Petterson

Recommended Posts

Posted

I've posted this a couple of times now, but havn't managed to get a responce. Third time lucky eh?

 

Does anyone know how to alter the code in the <table> found in product_info.php - it's the file that is used when you click on a product in the product list, which then just displays that selected product.

Instead of the text appearing on the left with the image on the right, I'd like to have their positions swapped round the other way. I'd also like to to disable the hyperlink on the image and get rid of the 'click to enlarge' text.

Any ideas?

Sometimes I think I understand everything, then I regain consciousness

Posted

Hi Rob.

 

Yes - I suggest you learn some basic HTML-coding skills, and then rearrange/swop the <td></td>'s in catalog/products_info.php :).

Thats the way to change the order of that.

 

When thats done, just outcomment the link for "Click to Enlarge Image".

Best Regards

olby

Posted

In my version of osC (its an old one)

i would go to line 87 of products_info.php

 

line87:

<table border="0" cellspacing="0" cellpadding="2" align="right">

and change align="right" to align="left"

If that works, i'd take the block from line 94 to line 95:

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

and change it to:

document.write('<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE; ?>');

//--></script>

but don't blame me if it doesn't work.

Archived

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

×
×
  • Create New...