You are here:  » time out value


time out value

Submitted by tom99 on Tue, 2006-10-31 16:14 in

Hi, I'd have a couple of questions:
How can I import larger datafeeds without jacking the time out value to like 30 minutes or more? Is there another way to import them?

and...
Under "Category" some category links and the according directories look like this:
"AccessoriesOffice Accessories" instead of "Accessories Office Accessories"
or
http://mydomain.com/category/AccessoriesOffice-Accessories/ instead of
http://mydomain.com/category/Accessories-Office-Accessories/
...so I guess it's ignoring a ":" or other characters
How can I work around this?
Thanks!
tom99

Submitted by support on Tue, 2006-10-31 16:33

Hi Tom,

The import scripts use the set_time_limit() function to disable the time limit (assuming your server allows it) - so you should not need to make a change the configuration provided that you are not running in safe mode. You can also import via the automation scripts - these are intended to be run from a CRON or other scheduled process, but you can run the commands manually. You will need to login to your server via Telnet or SSH, and then issue commands similar to the following, where $ is the command prompt:

$cd /path/to/pricetapestry/scripts/
$php import.php filename.xml

...where filename.xml is the filename of an already registered feed. The script will automatically look in the ../feeds directory, you do not need to specify a relative path. This will import the feed and give a textual display of the progress.

With regards to the category naming - you are correct, the script has removed an invalid character as a result of the normalise function which makes sure everything is safe to use throughout the site. The easiest way to work around this is to modify the normalise function to replace invalid characters with a space instead of removing them. Look for the following code on line 27 of includes/tapestry.php

$text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/e','',$text);

Replace this with:

$text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/e',' ',$text);

Hope this helps,
Cheers,
David.

Submitted by tom99 on Tue, 2006-10-31 20:22

Thanks for the hint with the import scripts.
Replacing the code in includes/tapestry.php didn't solve the problem,
or do I need to reimport the feeds in order to see the changes with the category naming?

Thanks!
tom99

Submitted by support on Wed, 2006-11-01 08:18

Hi Tom,

Sorry, Yes - you will need to re-import before the category values are changed based on this modification as the code in the import record handler is only used during the import...

Cheers,
David.

Submitted by tom99 on Thu, 2006-11-02 12:59

David,
In regards to the code replacement in includes/tapestry.php:
Some feeds have these characters "~~" separating sub categories from main categories. How can I get these characters replaced with this for example ": " ?
And... under "featured products"... I'm not sure if I'm entering the product names correctly, but there is nothing displaying on the index.php below the search box, except for "Featured Products".
Thanks for your help!

Submitted by support on Thu, 2006-11-02 13:31

Hi Tom,

You can use the Search and Replace filter against the field that you have registered as category; use search "~~" and replace with ":" should do the trick.

Regarding Featured Products, it is sometimes a case of leading or trailing spaces causing the problem. The name on each line of the text area must match the name of the product you want featured exactly otherwise it will not be found when the featured products are displayed.

The easiest way to do this is have your admin page (featured products) open in one window, and in another window browse your site to each product you want to feature and then copy and paste the product name from the product page into the Featured Products box...

Hope this helps!
Cheers,
David.

Submitted by tom99 on Fri, 2006-11-03 11:06

David,
I'm still having a problem with missing spaces in descriptions. Usually the space in the beginning of a sentence is missing, after a "." or "!"
I can't seem to replace the "~~" (usually in the secondary category of most feeds used to separate categories from sub-categories) with the search & replace function. Any suggestions?
Thanks!
Tom

Submitted by support on Fri, 2006-11-03 11:14

Hi Tom,

There may be other characters between the ~ that are not being displayed - can you try a search and replace using "~" in the search field and to see if that makes a difference.

If it's still not finding it i'll need to take a look at the feed in order to work out what filters to use - can you email me the link to the feed from in your /feeds/ directory (e.g. http://www.yoursite.com/feeds/merchant.xml) - reply to your reg code or forum registration email is the easiest thing to do.

If it's in the same feed, if you could let me know which product is causing the missing spaces in the description i'll take a look at that also.

Cheers,
David.