Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

List of X-Cart hooks

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-20-2019, 08:50 AM
 
dotancohen dotancohen is offline
 

Newbie
  
Join Date: Jun 2019
Posts: 2
 

Default List of X-Cart hooks

I am considering using X-Cart for a project. A critical step would be to make an HTTP request to a remote server on order completion. I have tried to search for a list of hooks, but found only the upgrade hooks:
https://devs.x-cart.com/misc/upgrade_hooks.html



Are there any other hooks available in X-Cart, or would one have to modify the core X-Cart files? Where is there a list of X-Cart hooks?


Thank you.
__________________
The requested URL /VERSION was not found on this server.
Reply With Quote
  #2  
Old 06-25-2019, 04:55 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: List of X-Cart hooks

Hi @dotancohen,

Welcome to X-Cart forums!

X-Cart does not use hooks that allow you to insert your code only into particular parts of the business logic.
Instead, we use the decorator pattern that allows you to change every piece of the software:
https://devs.x-cart.com/getting_started/applying-logic-changes.html

In your particular case, you need to create a module that would decorate \XLite\Model\Order::processSucceed() method and insert your code there.

This processSucceed() method is called when the order is accepted in the system.

Let me know if it makes sense to you.

Tony

Quote:
Originally Posted by dotancohen
I am considering using X-Cart for a project. A critical step would be to make an HTTP request to a remote server on order completion. I have tried to search for a list of hooks, but found only the upgrade hooks:
https://devs.x-cart.com/misc/upgrade_hooks.html



Are there any other hooks available in X-Cart, or would one have to modify the core X-Cart files? Where is there a list of X-Cart hooks?


Thank you.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:49 AM.

   

 
X-Cart forums © 2001-2020