Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

3rd party integration for single sign on support
 
skippybosco
Enthusiast
 
Avatar
Total Posts:  796
Joined:  2008-10-03
 

I’ve been looking through the documentation trying to find any information on how i can best code 3rd party integration based on certain activity triggers (new user creation, payment complete for product, etc)

example:

1) When a new user is registered in Magento I want to trigger user creation in a 3rd party application. I have all the code to create the user programatically, just trying to figure out the best location and way to trigger it in Magento. Preferably this would be done without having to hack the core code so it is portable for others to use.

2) When a user logs in triggering the creation of a cookie for a 3rd party application. Again I have the code to generate the cookie, just trying to figure out the best location and way to trigger it in Magento.

3) Lastly, when a product payment is complete triggering a call to a 3rd party web service to automate product fulfillment.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PandaWebStudio
Member
 
Avatar
Total Posts:  40
Joined:  2008-04-19
Amsterdam, Netherlands
 

You could take a look at the Event-Observer section in wiki:
http://www.magentocommerce.com/wiki/customizing_magento_using_event-observer_method

 
Magento Community Magento Community
Magento Community
Magento Community
 
skippybosco
Enthusiast
 
Avatar
Total Posts:  796
Joined:  2008-10-03
 

That is exactly what I was looking for, thank you.

Some of them seem rather obvious I think, let me see if I have this correct:

customer_model_after_save = when a new customer is created in the database
customer_login = when a customer logs in
customer_logout = when a customer logs out
sales_order_place_after = after an order has been placed

On the sales_order_place, any ideas on how to differentiate when an order is placed versus when payment has been completed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
PandaWebStudio
Member
 
Avatar
Total Posts:  40
Joined:  2008-04-19
Amsterdam, Netherlands
 

These are the possible order states (class Mage_Sales_Model_Order):
const STATE_NEW = ‘new’;
const STATE_PENDING_PAYMENT = ‘pending_payment’;
const STATE_PROCESSING = ‘processing’;
const STATE_COMPLETE = ‘complete’;
const STATE_CLOSED = ‘closed’;
const STATE_CANCELED = ‘canceled’;
const STATE_HOLDED = ‘holded’;

 
Magento Community Magento Community
Magento Community
Magento Community
 
skippybosco
Enthusiast
 
Avatar
Total Posts:  796
Joined:  2008-10-03
 

Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top