You are here:  » Customising how featuredExternal is shown

Support Forum



Customising how featuredExternal is shown

Submitted by highlander on Fri, 2010-03-05 18:17 in

Hi David

Can you tell me what the best way would be to go about changing the layout of featuredExternal when I use it for my sites home page (PT is on a subdirectory).

I had a look at the featuredExternal.php file and its not obvious to me what I would change on this. I would like to do a few different things

- have the products shown in more than one row
- alter the image size
- remove the link to reviews
- change the more information link to a button
- change the font size of the product name

Thanks for your help

Regards
Jamie

Submitted by support on Fri, 2010-03-05 21:34

Hi Jamie,

I'd start by taking a copy of html/featured.php and creating a new file, say featured2.php specifically for use by featuredExternal.php. Then, in featuredExternal.php search for "html/featured.php" (without the quotes) and replace with "html/featured2.php".

Regarding the layout changes you want to make, in the new featured2.php;

- have the products shown in more than one row

You can find the changes for that in the following thread...

http://www.pricetapestry.com/node/284

- alter the image size

On line 11 you'll find the height='100', so you can either adjust the height, or replace it with a fixed width. I don't recommend specifying both height and width as this would distort the image...

- remove the link to reviews

Look for the following code on line 13:

<?php if ($config_useInteraction): ?>

...and REPLACE with:

<?php if (FALSE): ?>

- change the more information link to a button

There are 2 places where the link is generated depending on whether this is more than one merchant - WITHIN line 26:

<?php print translate("Compare Prices"); ?>

...and line 29:

<?php print translate("More Information"); ?>

REPLACE both the above with your button image HTML, for example;

<img border='0' src='/images/moreinfo.gif' />

I would also recommend adding the width and height values for your button image as this will prevent any resizing of everything whilst the page loads; for example:

<img border='0' width='60' height='15' src='/images/moreinfo.gif' />

(border='0' prevents the image being highlighted to indicate that it is a link!)

- change the font size of the product name

As it stands, the product name is output within <h4> tags on line 9. You could either replace these tags with alternative HTML, or add an appropriate style to the CSS of your external site, for example:

.featured h4 {
  font-size: 12px;
}

Hope this helps!

Cheers,
David.

Submitted by highlander on Fri, 2010-03-05 23:19

Thank you David, I will work my way through your suggestions.

Gobsmacked to receive this reply so late on a Friday, just amazing support and much appreciated