You are here:  » add extra content to product pages

Support Forum



add extra content to product pages

Submitted by npaitken on Tue, 2008-08-12 14:11 in

Is it possible to add extra content to product search results pages - thinking of adding extra unique content to help provide useful info and also for SEO purposes.

Just been searching the forum and the nearest thing I could find was this thread. However, it involves creating new pages and adding some code.

The method in the thread above could be an option for me but wondering if there's an easier way to add content without having to create new pages?

Thanks,
Neil

Submitted by support on Tue, 2008-08-12 14:24

Hello Neil,

The neatest (and easiest) solution for adding your own unique content to product pages is to do something based on the technique described in the following thread:

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

This uses a directory where you simply create files of your own content (they can include HTML if you like) that have the exact name of the product of the page you want it to appear on (including spaces).

The code in that thread actually replaces the existing description; but you don't necessarily need to do that; the following code will simply add the content from your custom content file on the product page wherever you insert the following code (anywhere in html/product.php):

<?php
  
if (file_exists("descriptions/".$mainProduct["name"]))
  {
    require(
"descriptions/".$mainProduct["name"]);
  }
?>

Hope this helps!

Cheers,
David.