Forums OroCRM Extend Import Strategy of a bundle

This topic contains 1 reply, has 1 voice, and was last updated by  oro_newbie 1 year, 1 month ago.

  • Creator
  • #27395



    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
  • #27396


    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 can add this extra info somewhere.

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

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.