Hi, David,
when I type a "washing machine" key on the search string, all the products that have that word appear (including toys, spare parts, etc.). I would like to give priority to the products I am mapping, then inserting toys, accessories etc in the last pages. How can I do?
Hi Tobix,
At which stage in the mods to you get the 500 error - is it trying to import after making the changes to includes/admin.php or doing a search after modifying search.php?
Cheers,
David.
--
PriceTapestry.com
yes. the problem is if I look for an unmapped product it gives me an error!
Hi Tobix,
I have just tried a few searches on your site which looked OK, can you confirm a keyword to try that causes the error?
Thanks,
David.
--
PriceTapestry.com
Hi Tobix,
Please could you double check the database changes from /admin/ by going to Tools > Feed Utilities and then click Imported Analysis alongside one of the feeds that you know has mapped products. On the results page, use the search box to locate one of those products to go to the product record. When viewing the product record, can you see the `mapped` field with the value 1?
If that looks OK, please could you restore the modified search.php and let me know when it is online as well as a mapped product name that is causing the error...
Thanks,
David.
--
PriceTapestry.com
Hi Tobix,
This can be done easily for searches that trigger the FULLTEXT query. First run the following dbmod.php script from the top level of your Price Tapestry installation to add a`mapped` field to the products table:
<?php
set_time_limit(0);
require("includes/common.php");
$sql = "ALTER TABLE `".$config_databaseTablePrefix."products` ADD `mapped` INT(11) NOT NULL default '0'";
database_queryModify($sql,$result);
print "Done.";
?>
Edit includes/admin.php and look for the following code at line 304:
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"]) $importRecord["image_url"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"];
...and REPLACE with:
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"]) $importRecord["image_url"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"];
$importRecord["mapped"] = 1;
Then edit search.php and look for the following code at line 89:
$orderByFullText["relevance"] = "relevance DESC";
...and REPLACE with:
$orderByFullText["relevance"] = "mapped DESC,relevance DESC";
Finally re-import all feeds to get the new mapped field set for mapped products, and they should appear first in the results...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com