No automatic export of confirmed orders with mass action

  • Posts: 6
  • Thank you received: 1
4 years 6 months ago #318534

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.8.10
-- PHP version -- : 5.6

Hello,

I have a question width Mass Action about creating a report csv file after a order is confirmed.
I'm using Paypal as payment method (with Paypal Express Checkout plugin) and everything works fine. At the end of the payment procedure, when returning on my website I can actually see that the order has been confirmed.

I'd like to use that confirmation as a trigger for a mass action that exports on a file csv all the confirmed orders. Setting everything up on "mass action" section and clicking on the "Process" button I get a file on my server and on a mail with all the data I need, as I expected.

My problem is that I can't get this automatically when a order is confirmed. I still have to click "Process" in order to get my data file.

Can you help me in that issue?

Thanks for your help and time.

Last edit: 4 years 6 months ago by audiosonica.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 6 months ago #318535

Hi,

You need to add a trigger to your mass action so that it is processed automatically.
Now, if you use the "after an order is updated" trigger, you'll only have the order being changed in the CSV file.
If you want all of them, I would rather recommend to use a trigger "every minute", and then configure your cron task to run as often as possible:
www.hikashop.com/support/documentation/5...ashop-cron-task.html
Note that if you use the cron task from our server, you'll be limited to one export every 15 minutes as the cron will only run every 15 minutes. But if you configure it on your server, you can have it execute every minute.
In that case, the CSV file you'll get from the mass action will always be up to date with the orders (with a margin of -+15 minutes or 1 minutes).

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

  • Posts: 6
  • Thank you received: 1
4 years 6 months ago #318639

Hi Nicolas,
thanks for your reply.

I did use a trigger set to "order created" as you can see in the attached image where I show you all my settings for the action.
Everything works fine if I trigger myself the procedure using the "Process" button.

I expected to find the updated csv file on the server when returning from paypal site after buying the product. But no file is produced.

Maybe is because I have the free version?

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 6 months ago #318645

Hi,

No. However, you have a problem with your mass action.
The "after an order is created" trigger will launch the mass action when the order is been created.
However, with most payment methods, the order is created, you're redirected to the payment gateway, you make the payment, the payment gateway notifies HikaShop, and HikaShop update the status of the order to "confirmed".
So in the "after an order is created" trigger, it's likely that the status of the order is not "confirmed", but "created".
That's why in my previous message, I mentioned instead of the "after an order is updated" trigger.

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

  • Posts: 6
  • Thank you received: 1
4 years 6 months ago #318695

Thank you Nicolas,
I updated the trigger with "after an order is updated" and I'm able to get the mail with the csv file attached and the same file available in the selected location on the server.

Altough, the data are not what I expected, since the file contains only the last order and with very few infos (I selected a lot of infos with the checkbox provided in the mass action).

The strange thing is that if I trigger the very same mass action using the Process button I get the file as I expected.
I attach here both csv file so you can check yourself.

One hint could be that the title of the mail is different for the two methods:

Method 1: payment procedure with Paypal, and returning back to the site
Mail title: File CSV di azione di massa (in italian)
FIle: only the last order with few infos

Method 2: click "Process" button on Joomla! admin
Mail title: Mass Action CSV File (in english)
FIle: all the orders with all the required infos

Thanks for your help

Marco

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 6 months ago #318696

Hi,

Yes, that's what I explained in my first message here.
If you want all the orders, you should use a "every minutes" trigger and configure your cron task. Otherwise, with the "after an order is" triggers, only the order triggering the mass action system will be taken into account.

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

  • Posts: 6
  • Thank you received: 1
4 years 6 months ago #318768

Ok,
I understand now the differences between the options. Actually I can't use cron aptions since, as I told you, I have the free version of the product.
I will evaluate buying some version with cron.
Thank you for your help. I must say that the customer care and the support you give is awesome! Surely worthwile the price of the product!!
Take care

The following user(s) said Thank You: nicolas

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

Time to create page: 0.061 seconds
Powered by Kunena Forum