Skip to Content
author's profile photo Former Member
Former Member

Overriding behaviour in PromotionsManager?

Hi,

Does anyone know how one would override the behaviour in PromotionsManager? (We would like to override the filterPromotionsByRestrictions method to customize the restriction behaviour) We have already extended the PromotionsService, but there a PromotionsManager is created from a getInstance() method with some logic behind it that I'm unfamiliar with.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2015 at 12:44 PM

    Hi Onno,

    In order to extend default PromotionsManager, you need to:

    1. Create/use existing extension and update extensioninfo.xml as follows:

            <extension abstractclassprefix="Generated" classprefix="CustomCore" managername="CustomCoreManager"
               managersuperclass="de.hybris.platform.promotions.jalo.PromotionsManager" name="customcore" usemaven="true">
      
      
    2. Override filterPromotionsByRestrictions method in your custom manager

    3. Override getPromotionsManager method from DefaultPromotionsService to return your custom manager

    Regards, Alina

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.