Send out Order message to customer after import

  • Posts: 165
  • Thank you received: 3
8 years 7 months ago #237851

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1

Hi, I have a client who gets a large number of orders a day sometimes 1000 orders in a day during holidays. I have a few questions about this.

They export the orders and re-upload the orders with the order status changed to shipped and I also have a custom field in the order tabled called tracking_number that they type the tracking number in. When the order status is changed to shipped after the import the csv I would like it to email the customers and notify i.e send the order status notification email that the order has shipped.

This is easy to do when I do one order at at time because I can click save and notify after I change the order status and input the tracking number however after i bulk import the order status via a csv I have no idea how to do this.

1)I have 2 questions how do I have it automatically email the customer after an import like this? I am guessing you may use mass actions but I have no clue as to how to go about doing this.
2)If I am able to do what I am asking in question 1 how can I have it stagger the emails I am guessing if a csv is uploaded with 1000 orders in and it emails 1000 customers at 1 time the server could get blacklisted so I would need a way to not send all the emails at once? I talked to my hosting companyy as well and they said it would be better to stagger the emails at a script level rather than on a server level because if it is done on a server level they could time out and not all get sent out.

Thanks,

Josh

Last edit: 8 years 7 months ago by jschroeder. Reason: mispelling

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

  • Posts: 165
  • Thank you received: 3
8 years 7 months ago #237863

Hi, is there even a way to bulk import order status? I thought I had saw a way but now that I am looking a only see a way to export the orders not import them.

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

  • Posts: 165
  • Thank you received: 3
8 years 7 months ago #237873

Looking at the tables in phpmyadmin for the orders it appears impossible to to do this. I need to be able to export the orders out which is currently possible and then re-import them back in again with the shipping status changed and the tracking number changed.

Adding 1000 tracking numbers manually and 1 by 1 changing the shipping status is going to be impossible for the client.

How can I get this to work?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #237874

Hi,

Indeed, HikaShop has no import of CSV for orders.
So I don't know how your client does it, but not with something we have by default in HikaShop.

Supposing that it's done with a custom script, I suppose that they directly update the orders in the hikashop_order table without going through HikaShop at all and thus you don't get the triggers called nor the email system involved.
But even if you did, sending 1000 emails in one script processing is not a good idea.
Ideally, the script will probably have to be rewritten to be triggered regularily through a cron, and each time it is triggered, search for the CSV file, parse the first 5 lines and delete them from the CSV, parse them and use the HikaShop classes to save the new data so that the notification email can be sent.
So I think it's possible to do it, but it will require rewriting the script he is using.

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

  • Posts: 193
  • Thank you received: 76
8 years 7 months ago #237953

My client has lower number of orders, but harder emails limits. We have full synchronization with accounting software, but if you need only update orders from csv, it's much easier.
Our setup consists from one custom field and one mass action.
When order is marked as shipped in accounting software, order is updated with shipping id(tracking number) and custom field is set to 1 via remote call to custom plugin.
Mass action is triggered via cron every 5 minutes, filter orders with custom field set to 1, change status of this orders to shipped and send notification email.

Here are our custom fields:




and here is our mass action:



If you are going to update orders over csv file, all you need is very simple cron plugin to read csv file, update orders with tracking number and set custom filed to 1. Mass action will do the rest.

But mass action will not work for you at the moment, because there is one bug in SQL. Bug report is here .

Attachments:
Last edit: 8 years 7 months ago by korzo. Reason: Added link to bug report

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

Time to create page: 0.087 seconds
Powered by Kunena Forum