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:

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .

    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 recieved your project brief and our expert will contact you shortly.
    Send Again