ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #24683
    oro_newbie
    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
  • #24702
    oro_newbie
    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://www.orocrm.com/documentation/index/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)

You must be logged in to reply to this topic.