I want to add a third party module in magento with composer. How can I do this?
1 Answers
If you're specifically interested in the mobile connect class, then you don't need to use Composer. The project GitHub repository links to this Magento Connect module, which implements a Magento module to give you the the class functionality as a Magento helper.
Generally speaking, there's no great way to use Composer on Magento 1. (Magento 2, Beta due out December 18th, is a different story). You can create a new composer.json
file in your root repository and installed composer packages as-per-normal (making sure not to deploy composer.json
to your actual web root), but Magento 1 doesn't have a native composer autoloader implementation, and Magento's native autoloader (the Varien_Autoload
class) shoves itself on the autoloader stack first and fails if it can't find a class. This means you need to do a lot of autoloader shuffling to get Composer's autoloader on there first.
The ins and out of this are all a little much for a single Stack Overflow answer. I wrote an article on using composer to install Magento modules (this won't cover your standard packages), and you might be intersted in the composer documents on working with frameworks.
I'd start trying to do this yourself, and when you get stuck on a specific part come back with a specific questions.
Good look!

- 164,128
- 91
- 395
- 599
-
Thank you for guidance, I had already seen that module but my manager wants to add this module using composer. I will try today and come back with question(S) if any. Thanks again for writing. – murtza gondal Dec 01 '14 at 08:54