0

I have built a Magento 1 extension which is available as a repo here:

https://github.com/BenGrant123/Duel_Emails/

Following this guide (http://magebase.com/magento-tutorials/how-to-make-magento-extensions-work-with-composer/) I have been trying to make the extension installable with composer. At the moment, I am able to get, or remove the extension by running composer require duel/emails or php composer.phar require duel/emails, but the extension is only installed to magento-root/vendor/duel - the code, design, locale and etc files are not copied to the desired destinations in magento-root/app.

In my composer.json I have created mappings like the below:

"extra": {
    "map":[
      ["app/etc/modules/Duel_Emails.xml", "app/etc/modules/Duel_Emails.xml"], ["app/design/frontend/base/default/layout/duel/duelgallery.xml",
"app/design/frontend/base/default/layout/duel/duelgallery.xml"],
    ]
}

which I believed should cause these files to be copied to the /app folder upon installation, but it doesn't seem to work as nothing appears in magento-root/app/etc, magento-root/app/design, or any of the other desired folders after installation of the extension.

Any help on this would be massively appreciated as it is the only thing stopping me getting the extension finished!

Thanks,

Ben.

0

The root composer.json (the one in your Magento project, not the one in the module) has to declare the Magento root dir so that the composer installer knows where to copy/link the module files:

  "extra":{
    "magento-root-dir":"./"
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.