Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Add your Own Entity, for Email Templating in Oro Commerce

    To make entity available for the email template you need to make it configurable with the Config Annotation.

    To make the SellerReview entity available for templating, simply import the @Config annotation and use it in the class.

    You can also change the default value of each configurable option using the default values argument:

    Then you need to register this function in the Email templates using the Twig environment.

    Register the Twig extension in the DI container:

    Create a DI compiler pass to register the created extension and function in the Email Twig Environment:

    Register the created compiler pass:

    Once you complete these steps, “your entity function” becomes available in Email templates.

    I have explored these things while creating module for OroCommerce Multi-Vendor Marketplace.

    Thanks for reading me. I hope you’ll get an idea of how you can use your entity for email templating in Oro-Commerce, please share your reviews on this, that will support me to write more.

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again