Triggering shipped e-mail.

  • Posts: 180
  • Thank you received: 13
10 years 3 months ago #168958

-- HikaShop version -- : 2.3.0

Hi

When shipped, we are updating the status of an order from an external system (i.e. we are not using the Joomla/Hikashop backend). Is there a way of triggering the shipped status e-mail to be sent once we change the status?

Thanks in advance

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

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #168960

Hi,

I think that using this trigger will do the job:
hikashop.com/support/support/documentati...#onBeforeOrderUpdate

Add just a check on the order status, and if it is a shipped status, so execute your code.

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

  • Posts: 180
  • Thank you received: 13
10 years 3 months ago #169045

Thanks for the reply and the link Xavier.

The trigger will not run as we are updating the order status from an external system, so Hikashop is bypassed.

I wanted to know what code Hikashop runs to send an update e-mail for an order.

i.e. External system updates the status in the MySQL database for the order, then executes a method to send the standard e-mail.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #169061

Hi,

In your case the best way will be to call the class "order" and do a "save", this way the mail will be automatically called.

To use the order status notification mail, it require to have the full order data, so using the save function of the order class is the best way.

Else you can look at System > Email, get all the desired email content (html & preload) and get the required values via some requests, manage the variants, and send it using php mail function.

The following user(s) said Thank You: esotechie

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

  • Posts: 180
  • Thank you received: 13
10 years 2 months ago #169344

Thanks Xavier

I will have a go at the first option.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum