You are here:  » Feature Product of the Month

Support Forum



Feature Product of the Month

Submitted by FirstByte on Thu, 2009-05-28 17:20 in

Hi David,
I've managed to duplicate the feature page and created the option of a Product of the month.
The problem is that I'd like to display the product description and cheapest merchant logo (when products have the compared link available).

I've played around with a few variables but I can't seem to be able to display the product description or the merchant logo.

With the merchant logo, It displays the last merchant logo, as in if there are 5 merchants listed, it displayed the very last.
How do i go about modifying the features page to include the extra info.

regards
Rod

Submitted by support on Fri, 2009-05-29 08:59

Hi Rod,

Depending on your code, you'd need to access the first merchant in the array, using something like:

$product["products"][0]["merchant"]

If you're not sure, if you could post the code you are using that displays the last merchant, I'll look at how to modify it for you...

Cheers,
David.

Submitted by FirstByte on Wed, 2009-06-03 20:56

Hi David,

I've trying to get my head around the array, but still a programming newbie.

Below is code initial code i was using, which displayed the last merchant.

<div style="text-decoration:none; color:#006699; font-size:13pt; font-weight:normal;"> <a href='<?php print $product["productHREF"]; ?>' style='text-decoration:none;'> <strong><?php print $product["merchant"]; ?></strong> currently has the best price for <em style="text-decoration:underline;"><?php print $product["name"]; ?></em>. Save <?php
$miniPrice=$config_currencyHTML.$product["minPrice"];
$maxiPrice=$config_currencyHTML.$product["maxPrice"];
$saving = $product["maxPrice"] - $product["minPrice"];
print "".$config_currencyHTML.$saving;
?> Today.</a></div>

Thanks in advance.
Rod

Submitted by support on Thu, 2009-06-04 07:41

Hi Rod,

Which html/ file are you inserting the above code into?

Cheers,
David.

Submitted by FirstByte on Sat, 2009-06-06 21:59

Hi David,

I've included the above code into the feature.php, which appears on the frontpage.

Cheers
Rod

Submitted by support on Sun, 2009-06-07 06:05

Hi Rod,

Could you email me your feature.php and any other relevant files (i.e. where the SQL is made before the HTML module is called) and i'll take a look for you!

Cheers,
David.

Submitted by FirstByte on Tue, 2009-07-14 05:59

Hi David,

I've finally managed to sort it out. But was wondering how do I limit number of characters displayed in the product description?
I've rewritten a large majority of the product description which has about 3-4 paragraphs.

The descriptions appear on the front page and would like to limit it to around 100 words.

Cheers
Rod

Submitted by support on Tue, 2009-07-14 07:01

Hi Rod,

Have a look at the following thread which shows how to break the description to the nearest word after so many characters...

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

Cheers,
David.