X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Invoke API (https://forum.x-cart.com/showthread.php?t=68148)

fwm 11-13-2013 07:54 AM

Invoke API
 
Hi All,

I was wondering is there a way, when an order is placed to identify the products in that order belonging to a specific provider, then add these products only to an array and then call a php function so that I can notify them via their own API?

If noone knows how, then perhaps you could tell me where I would invoke call the funcition. Where is the order actually processed?

Thanks,
FWM.

cflsystems 11-13-2013 09:03 AM

Re: Invoke API
 
func.order.php - func_place_order. There is a code already that deals with providers

totaltec 11-13-2013 11:28 AM

Re: Invoke API
 
Quote:

Originally Posted by fwm
If noone knows how, then perhaps you could tell me where I would invoke call the funcition. Where is the order actually processed?

I believe Steve is spot on about where to start, but if you do need to know when an order is "processed" and take some action then look again in include/func/func.order.php for function func_process_order. This runs when an orders status is set to "processed", in other words "paid for".

cflsystems 11-13-2013 12:37 PM

Re: Invoke API
 
Quote:

Originally Posted by fwm
Hi All,

I was wondering is there a way, when an order is placed ....


It is being placed in func_place_order regardless of anything. This is one of the most weak places in the cart logic when order is created in XC before it actually exists, inventory is modified, special offers applied, points given... :) you name it

rogue 11-14-2013 06:08 AM

Re: Invoke API
 
There is no function to send an order to a supplier. For that you'll need custom code. Just so happens that I sell the code to do this. Contact me at the email below if you're interested.


All times are GMT -8. The time now is 01:47 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.