cancel
Showing results for 
Search instead for 
Did you mean: 

Add to Cart call inside extension

SOLVED

Add to Cart call inside extension

I, I am new to Magento and I need to build a simple extension that injects relevant videos to product pages.

 

 I want to know if it is possible, inside an extension, to know if a user made a click on Add to Cart. If yes, how?

 

Thanks

2 REPLIES

Re: Add to Cart call inside extension

Maybe you can use observers. You can listen for checkout_cart_product_add_before event to do something.

There are another events like:

  • checkout_cart_add_product_complete
  • checkout_cart_product_add_after

Listening for those events you'll be able to trigger any other action.

More about Magento observers: http://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-1.html#8

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Add to Cart call inside extension

Thanks Damien, I think that's it Smiley Happy Cheers