Hi,
New here after purchasing the script this week - so firstly, hello to all.
I'm messing around with the script and have setup several mapped products to enable a full price comparison. The compare prices page displays an image and description then the table underneath - however it only show the description from the cheapest merchant. Is there a way to create a custom description for mapped products only?
Thanks
Matt
Hi Matt,
Welcome to the forum!
There is an easy way to create custom descriptions / HTML for any product that does not involve any database modifications. To do this, simply create a folder called "descriptions" in your Price Tapestry installation folder. Inside that folder, create HTML files containing your custom descriptions (plus any additional HTML you wish to display of course) named as
Product-Name.html
(replacing spaces with - in the Product Name)
Then, in html/product.php, look for the following code beginning at line 12:
<?php if ($mainProduct["description"]): ?>
<p><?php print $mainProduct["description"]; ?></p>
<?php endif; ?>
...and REPLACE with:
<?php
$descriptionFilename = "descriptions/".tapestry_hyphenate($mainProduct["name"]).".html";
if (file_exists($descriptionFilename))
{
require($descriptionFilename);
}
elseif ($mainProduct["description"])
{
print "<p>".$mainProduct["description"]."</p>";
}
?>
Hope this helps!
Cheers,
David.