Possible to run mysql query after ordering certain

  • Posts: 45
  • Thank you received: 0
13 years 9 months ago #6989

Hi,

I was wondering whether it is possible to run a MySQL query after a successful order of a certain product. This query will basically insert the user details (name, add, etc) in to another table...

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 9 months ago #6997

Hi,

Yes, you can create plugin for HikaShop for that.
We have some documentation on that: www.hikashop.com/en/support/documentatio...r-documentation.html

you can implement the functions :
onAfterOrderCreate(&$order,&$send_email)
onAfterOrderUpdate(&$order,&$send_email)

You will have to load the products of the order from the table hikashop_order_products in order to check if your product is in the order and you will have to check the status of the order so that you know it's confirmed and skip otherwise.

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

Time to create page: 0.049 seconds
Powered by Kunena Forum