Jump to content
Sign in to follow this  
mushindo

Automatic Store Feeds Contribution

Recommended Posts

I'm having problem with the edirectory addon for this. Everything other than the addon works fine but when I attempt to open edirectory.php I get:

 

Warning: implode(): Bad arguments. in /home/devilwe/public_html/store/admin/edirectory.php on line 309
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 11

Edited by Toon

Share this post


Link to post
Share on other sites

Great Mod guys

 

Everything works fine. But i want to add a feed to shopbot.com.au

 

all they require is

 

"We just need an export (csv) with: product ID, product category, product name, product url, price, availability. Order matters."

 

Avaliability can be hard coded to be "See Store"

 

http://www.shopbot.com.au/addstore.html

 

Im okay with PHP but this sort of thing is beyond me.

 

can anyone offer a suggestion?

Share this post


Link to post
Share on other sites
Thanks Bruce for the help! I am using Ultimate SEO URls v2-2.2 on shared hosting. Before i could implement your fix, to fix the problem, i replaced the froogle.php in catalog/admin/froogle.php i installed from automatic store feeds, with froogle.php from froogle data feeder 1.62d w_SEO. and it worked! thanks for the contribution and support, fabulous!

 

 

 

I'm looking for that contibution and file but can't seem to find it. Do you have the exact name of the contibution or, even better, a link to it?

 

Is anyone working on an update to this contribution to work with Ultimate SEO URLs?


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites

The BizRate feed gives me an error "The page cannot be displayed" when I run it. Any ideas why? I've tried a couple of the other store feeds contributions and have the same results. I don't know, but it may have something to do with one of the other contributions I'm using so if anyone has any experience with any of them I'd be interested to know if there may be a conflict. i'm using Ultimate SEO URLs, UltraImage, and SEO Assistant. I do use some others, but I dont' think they'd be relevant.

 

Another question - with BizRate you need to give them a category number. I don't see anywhere in the feed that has a place for this. How does that work?


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites

Here's some more detail on my failure with BizRate/ShopZilla. I put a whole bunch of echo's in the code so it would tell me what was happening and show me where it failed. Here's some of the code:

 

echo "File Created - Starting FTP to ShopZilla <BR>\n";

//START FTP TO BIZRATE - UNCOMMENT AFTER TESTING FILE CREATION

function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )

{

echo "Attempting to Establish FTP Connection to $ftpservername <br>\n";

// set up basic connection

$conn_id = ftp_connect($ftpservername);

echo "Connection Status Return: <BR>\n";

if ( $conn_id == false )

{

echo "FTP open connection failed to $ftpservername <BR>\n";

return false;

}

echo "Connection Established - Logging In <BR>\n";

 

The following is the echo I get (starting with some returns from before the code snippet above):

 

Connecting to Datase

Collecting Data

Creating Output File

File Created - Starting FTP to ShopZilla

Attempting to Establish FTP Connection to ftp.shopzilla.com

 

As you can see, it makes it through the message indicating that the connection attempt is about to be made, but it never gets to the message indicating either a successful connection or a connection failure. It's bogging down at:

 

$conn_id = ftp_connect($ftpservername);

 

I'm thinking ftp.shopzilla.com is incorrect, though that's what was given to me by Shopzilla AND I can connect to it through a regular FTP client. I could sure use some help here!


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites
Here's some more detail on my failure with BizRate/ShopZilla. I put a whole bunch of echo's in the code so it would tell me what was happening and show me where it failed. Here's some of the code:

 

echo "File Created - Starting FTP to ShopZilla <BR>\n";

//START FTP TO BIZRATE - UNCOMMENT AFTER TESTING FILE CREATION

function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )

{

echo "Attempting to Establish FTP Connection to $ftpservername <br>\n";

// set up basic connection

$conn_id = ftp_connect($ftpservername);

echo "Connection Status Return: <BR>\n";

if ( $conn_id == false )

{

echo "FTP open connection failed to $ftpservername <BR>\n";

return false;

}

echo "Connection Established - Logging In <BR>\n";

 

The following is the echo I get (starting with some returns from before the code snippet above):

 

Connecting to Datase

Collecting Data

Creating Output File

File Created - Starting FTP to ShopZilla

Attempting to Establish FTP Connection to ftp.shopzilla.com

 

As you can see, it makes it through the message indicating that the connection attempt is about to be made, but it never gets to the message indicating either a successful connection or a connection failure. It's bogging down at:

 

$conn_id = ftp_connect($ftpservername);

 

I'm thinking ftp.shopzilla.com is incorrect, though that's what was given to me by Shopzilla AND I can connect to it through a regular FTP client. I could sure use some help here!

 

I've been searching for th ftp_connect() function but can't find it. Anyone know where it is? I'd like to see if there are different paramenters that it needs or if it's got a time out argument or something.


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites
I've been searching for th ftp_connect() function but can't find it. Anyone know where it is? I'd like to see if there are different paramenters that it needs or if it's got a time out argument or something.

 

I think I may have found the problem, but I still need a solution. It seems that the php ftp_connect function doesn't work on some host's severs. Such seems to be the case at GoDaddy, where my site is hosted. They're telling me I need a CURL script but give no help at all. I have NO CLUE about CURL. I've ordered a couple of books on CURL from Amazon but they won't be here until this weekend. does anyone have a CURL script I can use to ftp to Shopzilla?


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites
In response to the numerous reported issues and suggestions I have received so far for this contribution, I am starting a new thread to discuss:

 

- reported bugs

- fixes made

- suggested improvements

 

Over the coming few weeks I will be making some improvements to the coding to combat against incompatibility errors many people have found with the automatic uploads, plus adding some new features in based upon your feedback.

 

So anyone having issues or suggestions for improvements I ask that you post them here, and I will post either fixes, or notifications once new versions have been released.

 

Thanks.

 

 

Hi Mushindo,

 

Thanks for this contribution. It works well for me.

 

I've slightly modified it to run on a shop for Google Base US and for Google Base UK, with the required currencies and it works perfectly for me.

 

Now I'd love to make a feed for Google DE, since this shop is also in German. But the description indeed needs to be in German.

 

Would you know how to modify the code to pick up the descriptions in another language?

 

 

It could also be integrated into the next version of this contribution. Ideally a few variab les could be added at the beginning of the file (like it is presently done for the currency), e.g.:

 

$other_language = true; // Use another language than the default one. Default = false

$language = "de"; // Use that language if $other_language is true.

 

 

 

Thanks,

 

-Ben

Share this post


Link to post
Share on other sites

In case it can be useful to someone, I've made a version of the bidhopper.com feeder that supports currency conversion (useful if your main currency is not US Dollars).

 

The contribution is available at the same location than the others:

http://www.oscommerce.com/community/contributions,4455

 

Regards,

 

-Ben

Share this post


Link to post
Share on other sites

Bruce,

 

Great Contribution. Thank you for your effors in putting this together.

 

I have a small problem and have narrowed it down to /includes/functions/links.php file

in the function: CheckURL($url)

When I submit a new link, the page hangs on this line:

if (@file($url)) {

 

and then returns 0 after a minute or so. Basically, it's not able to connect to the url.

 

In php.ini I have

allow_url_fopen = On

 

Am I missing something?

Share this post


Link to post
Share on other sites

I have made a version of the Google Base feeders to take the product descriptions in the different languages, to be able to submit to Google Bas US, UK and Germany.

 

This will be useful for shops having more than 1 language.

 

I have integrated it into the Automated Store Feeds as the v3.2, available in the same contribution page:

http://www.oscommerce.com/community/contributions,4455

 

------------

Automated Store Feeds v3.2:

 

Added support for multi-languages stores, to generate feeds in the choosen language for Google Base (US, UK and Germany) and in English with USD for bidhopper.com

 

New features:

- Modified the Google Base feeders to permit to select the language of the feed. (Useful especially for non-English stores.)

- Created a froogle_us.php, froogle_uk.php and froogle_de.php for easy submitting to the different localizations of Google Base.

- Modified the sql file to insert entries in the database

- Updated the admin interface

- Modified the output of the id (last field of the feed) of the froogle feed, to respect the specifications of Google Base. (You need to have different ID for products submitted to Google Base US than for those sumbitted to Google Base UK & DE, otherwise Google considers them duplicate and removes them. So added a simple "us", "uk" and "de" to the id.)

- Fetching of the path is now done automatically (no need for manual editing) if currency conversion is enabled in the Google Base feed

 

- Modified the bidhopper feeder to get the prices in special (and not the normal prices) for special items:

- Modified the bidhopper feeder to specifically select the English language (useful for shop who don't have English as their default language)

- Modified the bidhopper.com feeder to accept currency conversion to USD.

 

Bug/fixes:

- Fixed an error of a double "/" in the path of the Froogle feed

------------

 

 

I hope it can be useful to others.

 

Regards,

 

-Ben

Share this post


Link to post
Share on other sites

OK, so I finally found some decent information on a cURL script and adapted it for use here. If anyone else runs into this problem you can message me and I'll send you the script.


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites
OK, so I finally found some decent information on a cURL script and adapted it for use here. If anyone else runs into this problem you can message me and I'll send you the script.

 

I would like it.

Share this post


Link to post
Share on other sites
OK, so I finally found some decent information on a cURL script and adapted it for use here. If anyone else runs into this problem you can message me and I'll send you the script.

 

OK - Here's the cURL FTP code:

 

<?php
$OutFilePath = "../feeds/"; //  path to file
$OutFileName = "shopzilla.txt";  //  file to upload
$OutFile = $OutFilePath.$OutFileName;
// Checc to see if it's a valid file; exit if not
if (!is_file($OutFile)) {
die("Exiting - Source, ".$OutFileName.", is not a valid file... :p~ <br>\n");
} else {
echo "Source, ".$OutFileName.", is a valid file!  :) <br>\n";
}

$URL="[url="'ftp://username:password@ftp.shopzilla.com/"]http://proxy.your.proxyserver.com:3128[/url] <br>\n";
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);  // is default anyway...
curl_setopt ($ch, CURLOPT_PROXY, "[url="http://proxy.shr.secureserver.net:3128"]http://proxy.your.proxyserver.com:3128[/url]");  //  Your proxy server
} else {
echo "Proxy Server: None<br>\n";
}
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);  //  to stop CURL from verifying the peer's certificate
curl_setopt($ch, CURLOPT_URL, $URL); //  The URL to fetch
curl_setopt ($ch, CURLOPT_TIMEOUT, 360);  //  The maximum number of seconds to allow CURL functions to execute
curl_setopt($ch, CURLOPT_UPLOAD, 1);  // TRUE to prepare for an upload
curl_setopt($ch, CURLOPT_INFILE, $fp);  //  The file that the transfer should be written to
// set size of the file, which isn't _mandatory_ but helps libcurl to do
// extra error checking on the upload.
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($OutFile));
echo "Uploading file...<br>\n";

// execute
$ret = curl_exec($ch);

echo "Check for errors...<br>\n";
if (empty($ret)) {
  // some kind of an error happened
  die(curl_error($ch));
  curl_close($ch); // close cURL handler
} else {
  $info = curl_getinfo($ch);
  curl_close($ch); // close cURL handler

  if (empty($info['http_code'])) {
	   die("<p>No HTTP code was returned"); 
  } else {
   // load the HTTP codes
   $http_codes = parse_ini_file("cURL.ini");

   // echo results
   echo "<p>The server responded: <br />";
   echo $info['http_code'] . " " . $http_codes[$info['http_code']];
  }
}

echo "<p>Close cURL - process complete<br>\n";
?>

 

Here's the cURL.ini file:

 

[Informational 1xx]
100="Continue"
101="Switching Protocols"

[Successful 2xx]
200="OK"
201="Created"
202="Accepted"
203="Non-Authoritative Information"
204="No Content"
205="Reset Content"
206="Partial Content"

[Redirection 3xx]
300="Multiple Choices"
301="Moved Permanently"
302="Found"
303="See Other"
304="Not Modified"
305="Use Proxy"
306="(Unused)"
307="Temporary Redirect"

[Client Error 4xx]
400="Bad Request"
401="Unauthorized"
402="Payment Required"
403="Forbidden"
404="Not Found"
405="Method Not Allowed"
406="Not Acceptable"
407="Proxy Authentication Required"
408="Request Timeout"
409="Conflict"
410="Gone"
411="Length Required"
412="Precondition Failed"
413="Request Entity Too Large"
414="Request-URI Too Long"
415="Unsupported Media Type"
416="Requested Range Not Satisfiable"
417="Expectation Failed"

[Server Error 5xx]
500="Internal Server Error"
501="Not Implemented"
502="Bad Gateway"
503="Service Unavailable"
504="Gateway Timeout"
505="HTTP Version Not Supported"


Respectfully,

 

Myron, the osCommerce Neophyte

 

 

If you always do what you've always done you'll always get what you've always got!

When was the last time you did something for the first time?

Share this post


Link to post
Share on other sites

I have been trying to send a feed to froogle which has been declined twice, they have manually reviewed my file and it appears that it is sending the url as https. I also have my store in the catalog folder and it is not sending it as mysite.com/catalog/product_info, in other words its missing the catalog portion of the url.

 

I was wondering if the https it is sending would be because I have to set my admin/configure.php to the following to secure all my admin pages.

 

define('HTTP_SERVER', 'https://site.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.site.com');

define('HTTPS_CATALOG_SERVER', 'https://www.site.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

 

 

Soo, I guess my question is this, how do I get it to stop putting the https in the url and get it to send it with the catalog/ ???

 

Thank you in advance for your help.

Share this post


Link to post
Share on other sites

I tried to edit that last post, must have waited too long.

 

I believe I solved my catalog problem on my own by making these changes in froggle.php

 

$imageURL = HTTP_SERVER.'/catalog/images/';

$productURL = HTTP_SERVER.'/catalog/product_info.php?products_id=';

 

I was wondering if changing HTTP_SERVER to HTTP_CATALOG_SERVER would solve my problem or would that knock the whole thing out of wack?

 

Thanks again in advance.

Share this post


Link to post
Share on other sites

ok, the change to HTTP_CATALOG_SERVER seems to have worked so far.

 

The catalog/ problem was on an old setup, I see the newer contribs for this have different code to solve this.

Share this post


Link to post
Share on other sites

whats up everyone, i think i got my auto feed to work. it displays this:

 

File completed: froogle_us_file.txt

Connected to uploads.google.com, for user *edited*

Uploaded /home/*edited*/store/feeds/froogle_us_file.txt to uploads.google.com as froogle_us_file.txt

 

Script timer: 4.087464 seconds.

 

however when i log into base, theres no products showing. does this take a few hours to upload the products or are they supposed to be listed automatically?

 

thanks in advance,

 

-ben

Share this post


Link to post
Share on other sites
I apologize in advance if this is a stupid question, but are you supposed to manually create the frooglefile.txt file, and if so where should you create it to? I have created an FTP account, and I updated the username and password settings in the admin section, and I left the server and filename the way they were. When I click on the RUN FEED button though I get the following message:

Right now I'm under the impression that this probably has something to do with the fact that I created the /feeds/ folder and set the permissions to 777 but there isn't anything in there at the moment. I didn't see anything in the installation guide about this, so I didn't really know what else to do with it. Is my thinking at all correct, or am I completely off track?

 

Thanks a ton for any help you can provide!

 

~Zach

Not a stupid question as far as I'm concerned. I'm having the same trouble. I notice also that the admin screen talks about a download button (never appears), right-clicking the appropriate column (nothing is appropriate).

 

I've connected on ftp manually. No problem. I get the following:

 

File completed: file.txt

Connected to uploads.google.com for user xxx

uploads.google.com FTP upload has failed!

 

After which I find no file in my catalog/feeds folder (yes, it's set to 777).

Share this post


Link to post
Share on other sites
whats up everyone, i think i got my auto feed to work. it displays this:

 

File completed: froogle_us_file.txt

Connected to uploads.google.com, for user *edited*

Uploaded /home/*edited*/store/feeds/froogle_us_file.txt to uploads.google.com as froogle_us_file.txt

 

Script timer: 4.087464 seconds.

 

however when i log into base, theres no products showing. does this take a few hours to upload the products or are they supposed to be listed automatically?

 

thanks in advance,

 

-ben

 

Hi Ben,

 

Yes, it takes a little while (generally a few hours) for Google to process your file. You'll see it's status in your Google base account (if it's uploaded, processed, etc.)

 

It then should now be arrived for you.

 

Regards,

 

-Ben

Share this post


Link to post
Share on other sites
Not a stupid question as far as I'm concerned. I'm having the same trouble. I notice also that the admin screen talks about a download button (never appears), right-clicking the appropriate column (nothing is appropriate).

 

I've connected on ftp manually. No problem. I get the following:

 

File completed: file.txt

Connected to uploads.google.com for user xxx

uploads.google.com FTP upload has failed!

 

After which I find no file in my catalog/feeds folder (yes, it's set to 777).

 

Hi baalwww,

 

Check to see if your paths are all alright in your /catalog/admin/configure.php

 

It seems to me that there could be a path problem since your feed file is not placed where it should be.

 

Tell us how it goes.

 

Regards,

 

-Ben

Share this post


Link to post
Share on other sites

ben,

 

where would i find the status of my items? i looked and couldnt find it and my items are still not showing up. thanks for the help!

 

-ben

Share this post


Link to post
Share on other sites
Hi baalwww,

 

Check to see if your paths are all alright in your /catalog/admin/configure.php

 

It seems to me that there could be a path problem since your feed file is not placed where it should be.

 

Tell us how it goes.

 

Regards,

 

-Ben

 

Hi Ben. Yes, it was the path, but not quite the scenario that's been discussed. I did change the "feeds to "/feeds, but it still didn't work. When I put an echo in to see what I was getting as a path, I realized that the file is calling for dir_fs_document_root . "feeds. Well, the dir_fs_document_root is not catalog, which I believe is where we were instructed to put feeds, the dir_fs_document_root is root. I changed it to dir_fs_catalog, and set "/feeds back to "feeds, and it worked just fine. Thanks.

Share this post


Link to post
Share on other sites
ben,

 

where would i find the status of my items? i looked and couldnt find it and my items are still not showing up. thanks for the help!

 

-ben

 

Hi Ben,

 

In your Google base account, somewhere near where you define the name of the file to upload, it tells you the status of your file.

(Sorry, I can't tell you with more precision as I have a multi-user account and the interface is different there.)

 

Regards,

 

-Ben

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×