You are here:  » featured products

Support Forum



featured products

Submitted by paullas on Wed, 2008-09-10 16:45 in

hi

is there any way to list featured prodcuts in list format rather then showing the imgage.
example

list 10 latest products and on the left of each product have a small image of the item

thanks

paul

Submitted by support on Wed, 2008-09-10 16:50

Hi,

Sure - the featured products HTML is generated by html/featured.php, so this can modified in any way required to change the layout - let me know if you need help with that aspect.

However, it may be that you want to do this separately to the main featured products on your home page, in which case the following thread may be of interest:

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

If you did want to try something like that, but with a different format - simply start with a copy of html/featured.php under a different name; and then require() the new file instead of the original at the end of your featuredcode.php...

Cheers,
David.

Submitted by paullas on Wed, 2008-09-10 20:41

hi

yes i would like a bit of help with this :) if thats ok. i would like t display the featured products on the front page ( http://www.directdiscount.co.uk ) so it lists them like it does herehttp://www.directdiscount.co.uk/product/NINTENDO-WALLE-WII.html but shows the normal featured options ir eveiw, compare etc

thanks

paul

Submitted by support on Thu, 2008-09-11 10:37

Hi Paul,

No problem - i've just crafted a featured products HTML module based on the search results HTML module:

featuredList.zip

Unzip, and upload featuredList.php to your /html/ directory. Then, to use this version in place of the original, edit index.php, and simply replace the following code on line 68:

if (isset($featured)) require("html/featured.php");

with:

if (isset($featured)) require("html/featuredList.php");

Cheers,
David.

Submitted by paullas on Thu, 2008-09-11 13:30

your a star david, thank you. now to fiddly bits :) if you look at http://www.directdiscount.co.uk you can see the site im working on. is it possible todo the following to the front page:

A: Make the images smaller
B: Make the text smaller
C: use an image for the workind review this product, more information and compare prices?

thanks agin david i really appreciate your time.

paul

Submitted by paullas on Thu, 2008-09-11 13:33

also is it possible to limit the amount of text that is shown, for example http://www.directdiscount.co.uk/product/Dads-Cab-Taxi-Meter.html

thanks

paul

Submitted by support on Fri, 2008-09-12 08:33

Hi Paul,

Re: Image size;

In featuredList.php - the image width is controlled by the following code on line 7:

width='80'

...here you can change the "80" to the width required, or alternatively replace it with height='xx' if you wanted to fix height instead...

Re: Text Smaller

Probably best done with CSS; although as a starting point you could try the SMALL tags around the description, so change line 13 from:

<p><?php print substr($product["description"],0,250); ?></p>

...to:

<p><small><?php print substr($product["description"],0,250); ?></small></p>

(and also perhaps user a lower order H tag for the product title on the line above....)

Re: Using image links.

Throughout the file, look for the where the links are generated by searching for the A tags; for example, line 20:

<a href='<?php print $product["reviewHREF"]; ?>'><?php print translate("Review This Product"); ?></a>

...and here you can remove the text between the A tags and replace it with the required image HTML. Remember to use border='0' when using images as links... for example:

<a href='<?php print $product["reviewHREF"]; ?>'><img border='0' src='/images/review.gif' /></a>

It is also possible to limit the amount of text displayed in the main description on the product page in exactly the same way as it is limited in the search results. In html/product.php, look for the following code on line 13:

<p><?php print $mainProduct["description"]; ?></p>

...and simply replace this with:

<p><?php print substr($mainProduct["description"],0,1000); ?></p>

...changing the 1000 to the number of characters you wish to limit the description to...!

Cheers,
David.