You are here:  » Helping Hands for Feed Automation

Support Forum



Helping Hands for Feed Automation

Submitted by sbedigital on Sat, 2008-08-02 09:41 in

Hi Dave,

Currently I use your command line script included in you TP to register the feeds as some of them are in excess of 1GB in size. Lot of the time I am having trouble, some cases even database currption because the script commands are too long because of the variable and options you need to include. While looking for solution, I have come across an idea whice you might be able implement.

My idea come from phpmyadmin. If you have used one your self you probably have noticed, everytime you do an action, phpmyadmin prints out a SQL STATEMENT and PHP CODE which you can copy and use in your application - very handy.

So how about doing exactly the same thing for TP Feed Registration Code. Perfect usage would be; I upload the XML FEEDS, Then associate relevent XML tag to the Feed Registration, When I press Complete, instead of registring the feeds, it's just prints out the shell commands with all the options and tags. Now I just copy and Paste that code on commandline script and by doing that all typing errors are eliminated.

Would that be possible? What do you think?

Noor

Submitted by support on Sat, 2008-08-02 14:24

Hello Noor,

Yes - that's quite straight forward to do! I've just written a utility to do this for you, but as a separate standalone tool rather than integrating it with the existing registration functionality.

The tool is called helper.php. Click here to download, then unzip and upload into the /admin/ directory of your Price Tapestry site. Then, simply browse to:

http://www.example.com/admin/helper.php

...and you will see a list of registered feeds. Click on "register.php" alongside the feeds that you wish to see the appropriate register.php command line for that feed; which you can then of course modify as required for other merchants from the same network.

Hope this helps!

Cheers,
David.

Submitted by paddyman on Fri, 2008-08-08 06:36

Hi David,

Have uploaded helper.php and trying to register the zavvi CSV feed. From helper.php I would use

register.php "zavvi.csv" "csv|44|1|34" "Zavvi" "product_name" "" "image_url" "aw_deep_link" "search_price" "merchant_category" "" "" ""

Trying to run this from the scripts directory but get "Command not found"

Should I be doing something else?

Thanks

Adrian

Submitted by support on Fri, 2008-08-08 09:36

Hi Adrian,

In that case you probably need to call it using PHP, so use:

php register.php "zavvi.csv" "csv|44|1|34" "Zavvi" "product_name" "" "image_url" "aw_deep_link" "search_price" "merchant_category" "" "" ""

Cheers,
David.

Submitted by paddyman on Sat, 2008-08-09 06:16

Thanks David,

Should have known that :)

Cheers

Adrian

Submitted by paddyman on Tue, 2008-08-12 20:15

Hi David,

Just need a little more help with this.

Registering another field - merchanturl. I'm copying the command from a feed I registered manually using this new field. However I'm having a problem registering, output I'm getting is

Usage: register.php

This is from register.php which shows all of my fields

$result = admin_register($filename,$format,$merchant,$fieldName,$fieldDescription,$fieldImageURL,$fieldBuyURL,$fieldPrice,$fieldCategory,$userCategory,$fieldBrand,$userBrand,$fieldRRP,$fieldAvailability,$fieldDelivery,$fieldReleased,$fieldMerchanturl);

and this is from helper.php which includes merchanturl

$cmd = "register.php \"".$feed["filename"]."\" \"".$feed["format"]."\" \"".$feed["merchant"]."\" \"".$feed["field_name"]."\" \"".$feed["field_description"]."\" \"".$feed["field_image_url"]."\" \"".$feed["field_buy_url"]."\" \"".$feed["field_price"]."\" \"".$feed["field_category"]."\" \"".$feed["user_category"]."\" \"".$feed["field_brand"]."\" \"".$feed["user_brand"]."\" \"".$feed["field_merchanturl"]."\"";

With this code above the command line I'm getting is

register.php "merchant.csv" "csv|44|1|34" "Merchant" "product_name" "" "image_url" "aw_deep_link" "search_price" "merchant_category" "" "" "" "deep_link"

where deep_link is the field from the feed which is mapped to merchanturl.

Any ideas what I'm missing above. Have tried several variations but haven't being getting it right.

Thanks

Adrian

Submitted by support on Wed, 2008-08-13 08:14

Hi Adrian,

If you would like to email me your modified includes/admin.php and scripts/register.php i'll check them over for you!

Cheers,
David.