cron: no order csv

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 8 months ago #340324

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.6

Hello, I created a cron job that should save a order as a csv. But I don't get a csv file. It is also unclear how the storage path should be specified. I look forward to support.
Settings:
- After an order is created
I do receive an email with the note mass action CSV date, but the text only says: CSV file exported to: 2022-03-21 14:16

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 8 months ago #340327

Hi,

Could you provide a screenshot of the settings of your mass action ? The path should be the file path. You can enter the absolute file path.
For example: /var/user/www/mywebsite/export.csv
But what path to enter will depend on your web server's setup.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 8 months ago #340341

Hi,

thanks for answer.
I tested with path:
- /home/www/moellerstonecare-shop.de/orderexport
and
- /home/www/moellerstonecare-shop/orderexport
but no result.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 8 months ago #340345

Hi,

Well, as my example in the previous message, the path needs to be the path of a file not a folder, so it should end with .csv
Also, I'm surprised of both your tests. Do you mean that you're not sure about the root folder path of your website on your server ?
Because you need to confirm that first. Otherwise, if you use a path which isn't for your website root path, PHP might not be able to write the file on the disk.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 8 months ago #340355

Hi there,

I have now assigned a file name, then the CSV was sent to me by email. But I don't want it that way, I would like the CSV to be stored on the ftp server.

AND: If I store a fixed file name, the file (ftp storage) will always be overwritten if I don't read it immediately (download)?!

How do you know this isn't my root path? I found this root path with filezilla.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 8 months ago #340360

Hi,

If you don't want the CSV file to be sent by email, just leave the email address field empty in your mass action.

The file will indeed be overwritten. If you don't want that, you can add the tag {time} in the file path so that the date will be added to the name of the CSV file. That way, the file won't be replaced.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 7 months ago #340378

Hi there,

Thank you for the feedback.

First of all because of the path: In my case it was sufficient to just specify the subdirectory, i.e. /orderexport/xxx.csv. It works.

And then because of the file name: order{time}.csv works, e.g. order2022-03-24_07-38.csv is output.
BUT: is there also a {time} variable that also outputs the seconds? The output of only minutes can be problematic, since another order can come in exactly in this minute, which then overwrites this again. 60 seconds can be very long!
Another solution: is it possible to include the order ID? (variable?)

Many thanks for the support.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 7 months ago #340393

Hi,

The format of the date there comes from the translation key:
HIKASHOP_EXTENDED_DATE_FORMAT="%Y-%m-%d %H:%M"
So you can use a translation override to add the seconds like so:
HIKASHOP_EXTENDED_DATE_FORMAT="%Y-%m-%d %H:%M:%S"
www.hikashop.com/download/languages.html#modify

There is no mechanism to have other tags. It could be possible with some modifications of the code.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 7 months ago #340398

Thanks for the feedback, then I'll let it run including the seconds and see if hopefully other orders aren't made in the same second.:whistle:

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

Time to create page: 0.072 seconds
Powered by Kunena Forum