OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM Extend Import Strategy of a bundle

This topic contains 1 reply, has 1 voice, and was last updated by  oro_newbie 6 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #30489



    Is there a way to extend the import strategy of a bundle. The particular one I’m speaking about is the Magento’s Customer Strategy. There is something I need to do before the entity is saved so I’m guessing it has to with modifying the beforeProcessEntity() function. I’ve extended the bundle with dependency injection and have copied the file CustomerStrategy.php extending the original CustomerStrategy.php and created a importexport.yml file declaring the new location of this file.

    It doesn’t seem to detect the new file though. Is there anything more that needs to be done?


Viewing 1 replies (of 1 total)
  • Author
  • #30490


    Ok, I figured it out. I missed a step.

    In your extended bundle, DependencyInjection/<Bundle>Extension.php you need to add:

    and in the importexport.yml (in your extended bundle) you need to change the path to your strategy file.

    It would then detect your custom strategy. Maybe this guide https://oroinc.com/orocrm/doc/current/book/importexport can add this extra info somewhere.

    Also in this particular case, the CustomerStrategy.php extends AbstractImportStrategy.

Viewing 1 replies (of 1 total)

The forum ‘OroCRM’ is closed to new topics and replies.

Back to top