automated product_quantity via CronPlugin doesn't working

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
7 years 6 months ago #269828

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.1
-- PHP version -- : 7.0.17
-- Browser(s) name and version -- : mozilla & safaria (latest version)

Hi,

I try to update the product quantity in my shop every 60 min. The update file just contains product_code and product_quantity

555-63748|15046;1
511-02232|15136;0
516-40053|15256;0
514-00056|15280;1
513-27354|15337;1
512-36847|15348;0
500-52421|15436;1
523-00348|15487;2

And will be uploaded via SFTP into the subfolder \UploadHika. Cron is configured to run every 15min. But the CronUpdatePlugin will not be triggered properly

LogFile :

******************** 2017-05-18 23:48 ********************
HikaShop Cron ausgelöst am 2017-05-18 23:48

******************************************************************************************************************************************************
******************** 2017-05-19 00:17 ********************
HikaShop Cron ausgelöst am 2017-05-19 00:17

******************************************************************************************************************************************************
******************** 2017-05-19 00:33 ********************
HikaShop Cron ausgelöst am 2017-05-19 00:33

But it’s working cause if I delete the file I receive:
******************** 2017-05-18 23:48 ********************
HikaShop Cron ausgelöst am 2017-05-18 23:48

******************************************************************************************************************************************************
******************** 2017-05-19 00:17 ********************
HikaShop Cron ausgelöst am 2017-05-19 00:17

******************************************************************************************************************************************************
******************** 2017-05-19 00:33 ********************
HikaShop Cron ausgelöst am 2017-05-19 00:33


The strange thing is that he’s running cause if the file is not available I receive an error message with every run.
******************** 2017-05-19 00:48 ********************
HikaShop Cron ausgelöst am 2017-05-19 00:48
---- Details ----
Could not find the file /homepages/25/d83827768/htdocs/2rs//UploadHika/bestandsupdate.csv

******************************************************************************************************************************************************
******************** 2017-05-19 01:03 ********************
HikaShop Cron ausgelöst am 2017-05-19 01:03
---- Details ----
Could not find the file /homepages/25/d83827768/htdocs/2rs//UploadHika/bestandsupdate.csv


In the attachment, you’ll find the plugin config. By the way - what is the schemata of the value in the Last Update field ?


Thanks and best regards
Markus

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 6 months ago #269829

Hi,

Make sure that you have a line:
product_code;product_quantity
at the top of your CSV, or it won't work.
Also, the column names setting of the plugin is to translate column names when you want to import a CSV with wrong column names. In your case, you should leave that setting empty.
These two reasons are probably why it doesn't work.

Please Log in or Create an account to join the conversation.

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
7 years 6 months ago #269872

Hi nicolas

thanks for the fast response.

The headers were already in the CSV and I deleted the field in the plugin. But still the same behavior - Cron is running and other tasks running eg exchange currencies update but no execution of product update tasks.

best regards
Markus

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 6 months ago #269875

Hi,

And if you import your CSV via the menu Products>Import, does it work ? What message do you get ?
Because it uses the same process. So if must first work there when you do it manually. And then, if the cron work, the automatic import has to work.

Please Log in or Create an account to join the conversation.

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
7 years 6 months ago #269929

hi nicolas,

after inserting a ‘\’ in the beginning (/uploadhika/bestandsupdate.csv) and delete the header fields in the plugin and leave them in the CSV - the plugin now does the upload. Great!
But (sorry for that) the problem is now that the file will not be deleted (even selected yes in the plugin). Therefore, the plugin now overwrites the quantity every time with old CSV data.
Rights on the file should be fine. For tests I changed it to 777. Interesting side effect – the system doesn’t send any mails anymore that Cron was executed.

any good Idea?

Best regards
Markus
PS : thanks my new name :-)

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 6 months ago #269930

Hi,

So it looks like it's working like you want:

- It is highly possible that if the plugin can import the file but not delete it that the access rights for the file allow your website user to read it but not modify it.
- In the Cron tab of the HikaShop configuration, you can configure how the cron emails behave. By default the system only send a notification email when something happens. So the process should be this: the plugin is triggered, the data, imported, the file deleted, the notification email sent, and next time the plugin is triggered, the file is missing and nothing is done, and thus no email is sent.

Please Log in or Create an account to join the conversation.

  • Posts: 98
  • Thank you received: 7
  • Hikashop Business
7 years 5 months ago #271014

Hi Nicolas,

sorry for the late response. I solved the problem by a scheduled FTP but it's still strange, cause with EXTPLORER I can delete the file without problems and in my webspace everything is running under the same user.

And also the mail. If I active the Mail then I receive every 15 min a mail that the file is not found (correct cause my system uploads just once a day). All actions like currency update etc will also run correctly and noticed via mail. In the cron where the Import is running will not send ANY mail. Therefore I still believe that there is a bug and the procedure is not completly finished

best regards
Markus

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #271062

Hi,

It looks like that there is a fatal error happening before the file is deleted and the email sent but after the import based on what you're saying. So check the PHP error log for any fatal error message corresponding to the cron import.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum