Hi everyone,
Distribution 12/10B is now available for download and is running on the official demo site:
http://www.webpricecheck.co.uk/
http://www.webpricecheck.co.uk/admin/
(username: demo password: demo)
Category Mapping Enhancements
http://www.webpricecheck.co.uk/admin/categories_configure.php?id=1
An on-page search form lets you search the category list and quickly click to add either the search terms (as a keyword match) or selected categories (as exact matches) to the Alternatives box.
Product Mapping Enhancements
http://www.webpricecheck.co.uk/admin/productsmap_configure.php?id=3
An on-page search form lets you search the product database and quickly click to add either the search terms (as a keyword match) or selected products (as exact matches) to the Alternatives box. In addition, custom description, category, brand and image URL values for the product can be entered to make your site unique.
Featured Products Enhancements
http://www.webpricecheck.co.uk/admin/featured.php
An on-page search form lets you search the product database and quickly click to add selected products to the Featured Products list.
Automation Tool
http://www.webpricecheck.co.uk/admin/automation_tool.php
Download feeds from affiliate networks directly to your site. A corresponding automation script fetch.php, to compliment import.php will automatically run specified or all jobs.
CRON
A new automation script cron.php performs the equivalent of fetch.php @ALL followed by import.php @ALL which can be set-up to run as a CRON job to update your site on the required schedule. An updated Support Info page automatically works out compatibility and derives available commands for you to enter into your web hosting control panel's CRON section.
Niche Mode
A powerful new setting in config.advanced.php restricts import to products that you have set-up in Product Mapping (note that you don't have to provide alternatives or custom field values). Used in conjunction with the updated Product Mapping tool you can easily create valuable price comparison sites that aren't diluted by thousands of uncompared products.
Admin section upgrade instructions from 11/09A and 12/10A follow...
Enjoy!
Cheers,
David.
--
PriceTapestry.com
Hi David, just looking at this now - looking very good! Cheers!!! Will the new import feature be able to work with a temp table for larger sites?
---------
Jill
Hi David ,
Love the new features, makes product and category mapping so much faster. Wasted my whole evening sorting them out after getting carried away following updating.
Anyways, one part that I found particularly useful doesn't seem to be working for me and that is the custom text on product mapping. I had a product listed twice, one had no description from the merchant whilst the other was overwhelming, so when I product mapped these two together I shortened the text from the overwhelming one, but after importing everything again so that I get just the one product showing with multiple merchants it still pulls in the description of the cheapest merchant instead of the custom description.
Ben
Hi Ben,
Was that following a clean install or using the upgrade patch?
Cheers,
David.
--
PriceTapestry.com
Hi Jill,
The import into a temporary table patch will still work fine - there haven't actually been any changes to scripts/import.php and I've just added the modification line numbers for 12/10B.
Cheers,
David.
--
PriceTapestry.com
Hi Ben,
If you could email me your includes/admin.php i'll check it out for you..
Cheers,
David.
--
PriceTapestry.com
Hi David
I have successfully installed the upgrade. I have run the automation. I am missing the statuses of some of my feeds. others feeds are showing OK status. But files do get imported into feeds folder.
What does it mean when there is no status shown?
Hi fstore,
The Status column in Automation Tool will be empty for jobs that have not been run yet - after clicking Run alongside those jobs the status should either go to OK, or indicate that a problem occurred fetching the file...
Cheers,
David.
--
PriceTapestry.com
After clicking run and finish the process. the status still doesn't show up. This only happens for few feeds, all other feeds show OK status.
also I am having another issue when run the cron.php. I get the following message:
fetching Always on Sale.xml
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 27
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 32
fetching Always on Sale.xml...[]
fetching Australiana Online.xml
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 27
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 32
fetching Australiana Online.xml...[]
Hi fstore,
When you click Run on the jobs that are not working, does it automatically return to the jobs page, or do you have to reload it manually (e.g. the page stops?)
Cheers,
David.
--
PriceTapestry.com
Hi
it returns to the job page.
how about my 2nd issue with cron.php. are they related?
regards
Hi fstore,
Yes - they will be related. Please could you enable database debug mode by changing line 6 in config.advanced.php to:
$config_databaseDebugMode = TRUE;
...and then run cron.php again and let me know what is displayed...
Cheers,
David.
--
PriceTapestry.com
Ran cron.php getting the following message
fetching Always on Sale.xml[UPDATE `pt_jobs` SET lastrun='1310740774',status='OK' WHERE id='2'][MySQL server has gone away]
fetching Always on Sale.xml...[OK]
fetching Australiana Online.xml[SELECT * FROM `pt_jobs` WHERE id='4'][MySQL server has gone away]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 27
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fstorec1/public_html/ozprice.com.au/shopping/includes/database.php on line 32
Hello fstore,
Thanks. That's actually a very occasional PHP / MySQL issue that can occur for reasons unknown - what happens is that PHP thinks that the MySQL connection is still alive, but actually it isn't.
It's straight forward to fix by making sure that a fresh connection is used for every query. In your includes/database.php, look for the following code at line 47:
$link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);
...and REPLACE with:
$link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword,TRUE);
And finally look for the following code at line 60:
return mysql_affected_rows();
...and REPLACE with:
$retval = mysql_affected_rows();
return $retval;
Don't forget to disable database debug mode by changing line 6 of config.advanced.php back to:
$config_databaseDebugMode = FALSE;
I would do this before re-trying cron.php as database warnings can be generated intentionally by the duplicate prevention mechanism during import...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
It worked! but had problem with large files (e.g. 30 MB and 40 MB) those giving error "ERROR - TRANSFER FAILED". I tried few times but same error message so I had to manually transfer them to my server.
Can we do anything about it?
Regards
Hassan
Hello Hassan,
Try using the curl automation handler by changing line 43 of config.advanced.php to:
$config_automationHandler = "curl";
...That may be more effective for large sources...
Cheers,
David.
--
PriceTapestry.com
showing this error when run cron.php
fetching Australiana Online.xml
fetching Australiana Online.xml...[ERROR - MIN SIZE ABORT]
Hello Hassan,
That could happen if the feed is actually smaller than the value you entered in the Abort if less than field on the job configuration page.
It's a safeguard to prevent good feeds on your server being overwritten by the results of a transient error at the feed source.
It would be worth testing first with the "Abort if less than" box empty, which should return something but it may be that the remote feed is currently unavailable, in which case double check the URL in the job and make sure there's no inadvertent characters on the end for example.
If it's still not fetching, if you could post the URL (I'll remove it before publishing your reply) I'll give it a go on my test server...
Cheers,
David.
--
PriceTapestry.com
Hello Hassan,
Thank you for the details. I checked the URLs and they are being re-directed which CURL isn't by default following. To fix this, edit your includes/automation.php and look for the following code at line 121:
curl_setopt($ch,CURLOPT_HEADER,0);
...and REPLACE with:
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE);
curl_setopt($ch,CURLOPT_HEADER,0);
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Made the changes...its fetch first 3 feeds and then cannot complete the fourth feed fetch which is around 25mb. corn.php just stopped. tried to run this twice both time same result. it is not working for me.
Hello Hassan,
It sounds like a server imposed timeout, I'll follow by email to you...
Cheers,
David.
--
PriceTapestry.com
Hi David,
Great Upgrade, thanks! I've got a slight problem when looking on the support page, I've got some errors in support.php like:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/unzip) is not within the allowed path(s): (/home/myaccount/:/tmp:/usr/local/lib/php/) in /home/myaccount/domains/myURL/public_html/PTdir/admin/support.php on line 75
So I don't think all the new features wil work...
Can you help me fix this?
Cheers,
Koen
Hello Koen,
That indicates that PHP is running in a restricted mode that is preventing access to the file system, probably outside of that user's home folder. Have a look at the following thread from the comment below;
http://www.pricetapestry.com/node/4127#comment-16618
This is a similar scenario and if you have SSH (command line) access to your account, and there already exists (or you can create) a bin/ folder in your home directory, creating links to each of the unzip programs (unzip, gzip) should do the trick. Let me know if you're not sure of course or not sure of the commands to run once logging in via SSH.
It is likely however that CRON itself would still be able to run despite the open_basedir restriction so to view the auto-generated CRON commands regardless, look for the following code at line 84 of admin/support.php:
if (@file_exists($config_CRONPrograms["php"]))
...and REPLACE with:
if (1)
...and then look for the following code at line 93:
if (@file_exists($config_CRONPrograms["wget"]))
...and REPLACE with:
if (1)
In the mean time, I'll look into updating the Support Info page so that it detects openbase_dir and give appropriate information...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Couple issues I keep running into. I upgraded from AdminUpgrade_From_1109A.zip and I just don't have the same options I see on the demo. I can't get the Voucher Codes to appear even when it's enabled in the config file and I'm also missing the merchant logo options. Anything special I need to do. I also modified my admin.php file as required.
Hi TWDesigns,
The upgrade package only contains the new admin features of 12/10B but I'd be happy to patch your existing files to include merchant logos and voucher codes. If you could email me email me your html/atoz.php, includes/admin.php and includes/tapestry.php i'll merge the changes for you...
Cheers,
David.
--
PriceTapestry.com
David
I've applied the upgrade patch and made the code changes as described, however the version number hasn't updated.
Please advise
Michele
Hi Michele,
The patch doesn't include an updated revision.txt as it is only the admin featured of 12/10B that are included; let me know of course if any part of the upgrade appears not to be working as expected and I'll check it out...
Cheers,
David.
--
PriceTapestry.com
Admin section upgrade from 11/09A and 12/10A
Important: To check which distribution you are running click Support Info from the Admin menu. Before making any changes, backup your site data using the Database Tool, and make a local backup of your existing /admin/ and /includes/ folders.
Download AdminUpgrade_From_1109A.zip or AdminUpgrade_From_1210A.zip. Unzip, and upload over the top of your existing Price Tapestry installation. Next, browse to upgrade.php once, and then delete the file. This will update the `productsmap` (Product Mapping) table, and add the new `jobs` (Automation Tool) table to your database.
Because numerous modifications documented throughout the forum involve changes to includes/admin.php, this file is not included in the upgrade patch. To complete the upgrade, look for the following code at line 268 (11/09A) or 273 (12/10A):
/* check product record for minimum required fields */
...and REPLACE with:
global $admin_importProductMappingsOverrides;
if (isset($admin_importProductMappingsOverrides[$importRecord["name"]]))
{
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["description"]) $importRecord["description"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["description"];
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["category"]) $importRecord["category"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["category"];
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["brand"]) $importRecord["brand"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["brand"];
if ($admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"]) $importRecord["image_url"] = $admin_importProductMappingsOverrides[$importRecord["name"]]["image_url"];
}
global $config_nicheMode;
if ($config_nicheMode)
{
if (!in_array($importRecord["name"],$admin_importProductMappings)) return;
}
/* check product record for minimum required fields */
Finally, look for the following code at line 412 (11/09A) or 422 (12/10A):
foreach($alternates as $alternate)
{
$alternate = trim($alternate);
$admin_importProductMappings[$alternate] = $productsmap["name"];
}
...and REPLACE with:
foreach($alternates as $alternate)
{
$alternate = trim($alternate);
$admin_importProductMappings[$alternate] = $productsmap["name"];
}
global $admin_importProductMappingsOverrides;
$admin_importProductMappingsOverrides[$productsmap["name"]]["description"] = (($productsmap["description"])?$productsmap["description"]:"");
$admin_importProductMappingsOverrides[$productsmap["name"]]["category"] = (($productsmap["category"])?$productsmap["category"]:"");
$admin_importProductMappingsOverrides[$productsmap["name"]]["brand"] = (($productsmap["brand"])?$productsmap["brand"]:"");
$admin_importProductMappingsOverrides[$productsmap["name"]]["image_url"] = (($productsmap["image_url"])?$productsmap["image_url"]:"");