Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Google Feed Ftp Upload Not Working Via Cron. Rate Topic   - - - - -

 
  • winsbury
  • Member
  • Members
  • Join Date: 28-Jan 20
  • 24 posts

Posted 01 January 2021 - 01:33 PM #1

PHP 7.2 , CScart 4.12.1

 

Google merchant account is set up and if I use Administration > Export Data > Data Feeds > [gear icon] > Upload to FTP server the product feed is correctly received and processed by Google ... great !

 

Next step was to set it up as a cron job which runs just fine as evidenced by a fresh copy of google_base.csv being created in /web/var/files/1/ at the allotted times.

 

BUT 

 

Google doesn't get the update !

 

It seems as though the cron triggered FTP upload is failing but there is nothing in the error logs to give me any clue as to why. I have double checked and manually triggering the FTP upload works every time so the ftp password, filename and account etc is all set up correctly.



 
  • winsbury
  • Member
  • Members
  • Join Date: 28-Jan 20
  • 24 posts

Posted 03 January 2021 - 04:36 PM #2

Thought I had spotted the issue 

 

Cron export settings was set to Server instead of ftp, but even after changing that it is still not working. 

 

Any other ideas ?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12076 posts

Posted 03 January 2021 - 09:35 PM #3

What is the cron command line that you're using?  You wil need to specify what layout to use.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • winsbury
  • Member
  • Members
  • Join Date: 28-Jan 20
  • 24 posts

Posted 03 January 2021 - 11:12 PM #4

What is the cron command line that you're using?  You wil need to specify what layout to use.

 
30 1,7,13,19 * * * /usr/bin/php /var/www/clients/client1/web1/web/admin.php --dispatch=exim.cron_export --cron_password=MYPASS --switch_company_id=0
It works perfectly if I upload via the Upload to FTP server option on the gear icon but refuses to update Google via the cron job. The cron job works as expected if  Export by cron is set to server but not when set to FTP.
 
layout: google_export
filename: google_base.csv
ftpserver: uploads.google.com


 
  • winsbury
  • Member
  • Members
  • Join Date: 28-Jan 20
  • 24 posts

Posted 04 January 2021 - 03:51 AM #5

I think I may finally have it working:

 

1. I was still able to login using Filezilla from a different IP address so figured maybe Google had blocked ftp from our server's IP address, presumably because of so many failed attempts. Changing the ftp password allowed logins to restart.

 

2.changed the filename to google_base.txt . Although a manual upload of a .csv file had definitely worked Google doesn't include csv in the list of allowed file types: "Use primary feeds to upload your product data to Merchant Center using text (.txt) files, XML (.xml) files, Google Sheets, or the Google Content API for Shopping"

 

Tested manually and with a cron and it worked! 

 

I will let it run for a few days and see if it stays working.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12076 posts

Posted 04 January 2021 - 09:00 PM #6

If you use 'txt' and TAB separate the data, Google will accept it.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • winsbury
  • Member
  • Members
  • Join Date: 28-Jan 20
  • 24 posts

Posted 05 January 2021 - 02:31 AM #7

If you use 'txt' and TAB separate the data, Google will accept it.

 

 

yes that is what I did but actually left it as comma separated which has worked just fine. Im not 100% whether it was renaming it to txt or resetting the ftp settings which cracked it but one or both of those sorted it.