hi David
I am looking to include related products from the company, category and brand on the product page, looked through forum, there was a similar request, however it was for 2009, tried the line numbers were different and got a lot of error messages.
Is there an updated version that will work on the new version of PT.
thanks
Brent
Hi Brent,
Related Products by default includes category,look for the following code beginning at line 84:
if ($product["products"][0]["category"])
{
$where .= "category = '".database_safe($product["products"][0]["category"])."' AND ";
}
To extend this to merchant and brand, REPLACE the above with:
$where .= "( merchant = '".database_safe($product["products"][0]["category"])."' ";
if ($product["products"][0]["category"])
{
$where .= " OR category = '".database_safe($product["products"][0]["category"])."' ";
}
if ($product["products"][0]["brand"])
{
$where .= " OR brand = '".database_safe($product["products"][0]["brand"])."' ";
}
$where .= ") AND ";
Hope this helps!
Cheers,
David.
--
PriceTapestry.com