Edit the $product_priority array with the merchant names as required. The last line of the replacement sets the main name to the original_name field of the preferred merchant for that field (since for compared products name will be the same for all records)...
Hello Fabio;
Sure - in html/product.php look for the following code at line 2:
$product_main = $product["products"][0];
...and REPLACE with:
$product_main = $product["products"][0];
$product_priority["original_name"] = "Merchant A";
$product_priority["description"] = "Merchant B";
$product_priority["image_url"] = "Merchant C";
foreach($product_priority as $field => $merchant)
{
foreach($product["products"] as $p)
{
if (($p["merchant"] == $merchant) && $p[$field])
{
$product_main[$field] = $p[$field];
}
}
}
$product_main["name"] = $product_main["original_name"];
Edit the $product_priority array with the merchant names as required. The last line of the replacement sets the main name to the original_name field of the preferred merchant for that field (since for compared products name will be the same for all records)...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com