Hi David,
I know this was mentioned on the forums before, but can't find it in the forum search.
I'm looking to have my own descriptions for certain products. I think this was done before in a similar way to using merchant logos, as in having a separate text file for each product description in a description folder, and if a description was present it would overwrite all merchants descriptions for that product ??
Hope you can point me in the right direction.
Thanks
Adiran
Brilliant :)
Works great. Thanks for the quick response and fantastic support as ever !!
Great mod.
Adrian
Hi Adrian,
There's code for taking the description from a preferred merchant (even if they are not the cheapest) in this thread, but it's straight forward to do as you suggest with a directory containing text files with your own descriptions.
To do this, create a folder "descriptions", and inside place text files with your own descriptions (including HTML if you like) using the filename:
Exact Product Name.txt
(the .txt will make it easier to manage the files in your text editor)
Then, in products.php, as with the above modification, look for the following code starting at line 18:
if ($numRows)
{
...and REPLACE this with:
if ($numRows)
{
$filename = "descriptions/".$rows[0]["name"].".txt";
if (file_exists($filename))
{
$rows[0]["description"] = file_get_contents($filename);
}
...and that should do the trick!
Cheers,
David.