Run a custom php script when order is complete

  • Posts: 90
  • Thank you received: 1
11 years 7 months ago #97604

I need to run a php script when the order is complete that can determine what was in the order. I.e. I need access to the $order object.

I need it to run for every order to check if a certain product was purchased.

Is this something that can be done without a plugin? Is there a view that I can access that I can implement my script into?

Thanks


:) — Josh

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 7 months ago #97615

Hi,

The best solution is to use a plugin.
www.hikashop.com/en/support/documentatio...#onAfterOrderConfirm

I don't see a right view which could contain such code because with some payment plugins it could not work at all.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 90
  • Thank you received: 1
11 years 7 months ago #97619

Thanks for the response Jerome. I'm actually performing this function just fine inside the paypal plugin. This will work ok for us as long as we stick with it as the main payment option. For now it will be ok.

Something I noticed: (this could be an issue on paypal's sandbox mode) but it no longer offers the "Return URL" that it used to, even though my paypal configuration has not changed. Any ideas?


:) — Josh

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97707

The return URL field is still present in the latest version of the PayPal payment plugin.

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

  • Posts: 90
  • Thank you received: 1
11 years 7 months ago #97727

Yeah, I saw the code in the PHP plugin file. I just am guessing it has something to do with paypal's revamping of their sandbox and developer portals. They've been acting all glitchy lately.

Just a heads up.


:) — Josh
The following user(s) said Thank You: nicolas

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

Time to create page: 0.064 seconds
Powered by Kunena Forum