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 7 years, 3 months ago.

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

  • Creator
    Topic
  • #30489

    oro_newbie
    Participant

    Hi,

    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?

    Thanks.

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

    oro_newbie
    Participant

    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