Hi David,
On comapre table display only all merchant logo, vouchers and price ..but can be possible to also display all seller product title (which use in seller feed)..
technoarenasol
Thanx David...I add above code..now working...y
Some merchant gives different variant of product so can be possible to display different variant price
Hi technoarenasol,
I would only recommend this aproach with a very niche installation which I know is what you are working on, so one option is to change the way duplicate products are "dropped" by using the merchants original name rather than the name field. This will result in the possibility of multiple records per product for the same merchant.
To do this, in include/admin.php look for the following code at line 354:
$dupe_key .= $normalisedName;
...and REPLACE with:
$dupe_key .= $importRecord["original_name"];
(don't forget to re-import as the above is only appied at import time)
Cheers,
David.
--
PriceTapestry.com
technoarenasol
Hi David actually I don't want display Variant title ..only want to display variant price and buy url link in small font size
Hi technoarenasol,
Taking it one step at a time; with the above modification in place and re-importing, are you now seeing all the information that you require in the price comparison table; but you would like to group each merchant into a single row with the variant prices displayed per merchant?
In other words, is all the data there now, but you want to display it slightly differently?
Cheers,
David.
--
PriceTapestry.com
technoarenasol
Yes I like to group each merchant into a single row ..
Ok, the $prices["products"] array should be sorted so that the first instance of each merchant's variant is the cheapest, so firstly to stop other instances of each merchant being displayed, in your html/prices.php look for the code that opens the loop, around line 9:
<?php foreach($prices["products"] as $product): ?>
...and REPLACE with:
<?php foreach($prices["products"] as $product): ?>
<?php
if (isset($shown[$product["merchant"]])) continue;
$shown[$product["merchant"]] = TRUE;
?>
Now to display other variants; I see from your screenshot example you want to display them in a list below the normal columns; so the easiest thing to do is add another table row. Look for the closing <tr> and closure of the display loop as follows (line 17)
</tr>
<?php endforeach; ?>
...and REPLACE with:
<?php
$variants = array();
foreach($prices["products"] as $p)
{
if (
($p["id"] <> $product["id"])
&&
($p["merchant"] == $product["merchant"])
)
{
$variants[] = $p;
}
}
if (count($variants))
{
print "<tr><td colspan='4'>Other variants available for ";
foreach($variants as $v)
{
print "<a href='".tapestry_buyURL($v)."'>".$config_currencyHTML.$v["price"]."</a> ";
}
print "</td></tr>";
}
?>
</tr>
<?php endforeach; ?>
Hope this points you in the right direction!
Cheers,
David.
--
PriceTapestry.com
technoarenasol
David.. I add above code..but not working
Hi technoarenasol,
Before applying the modification, can you confirm that in your price comparison table you had separate entries for each variant from the same merchant?
Cheers,
David.
--
PriceTapestry.com
technoarenasol
Yes David,I done cross check for variant but still not working.
Product mapping of Nokia Asha 300
{code saved}
note : I merge price.php into product1.php
Hi technoarenasol,
That actually appears as if the changes to dupe_hash haven't been applied yet. Please can you double-check the changes in this comment have been applied (and re-import since) but if it still doesn't appear to work please could you email me your includes/admin.php and html/product1.php and i'll check it out for you...
Cheers,
David.
--
PriceTapestry.com
technoarenasol
working now ..thnx ..David spacing problem in product mapping .If I give alternate product name "Nokia Asha 300" and If In merchant name give "Nokia Asha 300"(Double Space).So product name not consider in product mapping due to double spacing problem in product name.
Hi technoarenasol.
This is because normalisation (which removes double-spaces) is not applied until after Product Mapping. To make it easier in this case; look for the following code in includes/admin.php at line 266:
/* capture original catalogue product name prior to mapping */
$importRecord["original_name"] = $importRecord["name"];
...and REPLACE with:
/* capture original catalogue product name prior to mapping */
$importRecord["name"] = preg_replace('/[ ]{2,}/',' ',$importRecord["name"]);
$importRecord["original_name"] = $importRecord["name"];
That will remove any sequence of 2 or more spaces from product names right at the start; so they won't affect Product Mapping.
Cheers,
David.
--
PriceTapestry.com
Hi technoarenasol,
The distribution html/prices.php does show the seller product title, so I wonder if your modifications have removed that column?
In the distribution, there is a column "Catalogue Product Name" and each row displays that using
$product["original_name"]
...which is the merchant's name _before_ Product Mapping was applied. If you no longer have that table cell then you can add that back in, either as a new cell in its own right; or merged with other data just printing the value of $product["original_name"] where required...
Cheers,
David.
--
PriceTapestry.com