cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable multiple promotion groups for a site in Hybris?

chetanks3005
Discoverer
0 Kudos
644

I have a requirement where I want 2 promotion groups to be assigned to a BaseSite. Since OOTB allows only one promo group per site, How do I achieve it? Thanks in advance.

View Entire Topic
saood
Participant
0 Kudos

In the BaseSite --> You will have defaultPromotionGroup, which will apply to that site.

Generally, you can create various campaigns and assign to that promotion but still if you want multiple promotionGroup.

Can you please try this.

Add a collection to the baseSite - promotionGroupList.

Override the below method getPromotionGroups() of DefaultCommerceCartCalculationStrategy and return your promotionGroups inplace of below code


protected Collection<PromotionGroupModel> getPromotionGroups()
{
final Collection<PromotionGroupModel> promotionGroupModels = new ArrayList<PromotionGroupModel>();
if (getBaseSiteService().getCurrentBaseSite() != null
&& getBaseSiteService().getCurrentBaseSite().getDefaultPromotionGroup() != null)
{
promotionGroupModels.add(getBaseSiteService().getCurrentBaseSite().getDefaultPromotionGroup());
}
return promotionGroupModels;
}
chetanks3005
Discoverer
0 Kudos

Thank you.