cancel
Showing results for 
Search instead for 
Did you mean: 

Redefine violation message for new promotions

Former Member
0 Kudos
300

Hi, I am extending a default promotion that comes with Hybris and I want to change the default violation message shown. I added a new key for my promotion in

core-locales_en.properties

Like this

type.neworderrestriction.violationmessage.defaultvalue=Voucher is {0} valid for an order value above {1}.

However no matter what I do (initialize, update), the message is not shown (it always show the message from the top class). What I am doing wrong ?

Former Member
0 Kudos

Hi,

were you able to resolve this issue? If yes, pl lemme know the solution. I am also stuck with the same issue?

Thanks, Puneet

Former Member
0 Kudos

Unfortunately, no I did not find the issue :(. Let me know if you found it.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Frederic,

Try selecting the Update running system, Clear the hMC configuration from the database and Localize types checkboxes and also update system by checking the create essential data checkbox also. It worked for me.

Only select your extension while updating the system.

Former Member
0 Kudos

I did a reinitialization for my specific promotion and it did not work :(

Former Member
0 Kudos

yeah, I also did the initialization that but it didn't work for me as well.... It is weird i know but that's how it worked for me.

Former Member
0 Kudos

Hi ,

I encountered this type of problem before when I extended an OOTB promotion (e.g. OrderThresholdPerfectPartnerPromotion). Found out that it is not good to extend directly from an OOTB promotion because when it has an existing attribute like messageCouldHaveFired, it will use the parent class' default value and not the values that you wish to use. To address the issue you have to extend from AbstractPromotion, OrderPromotion and ProductPromotion (whatever your requirements fits from the three) and declare the attributes messageCouldHaveFired in your custom promotion. Hope this helps.

Thanks, Dom

Former Member
0 Kudos

You mean redeclare messageCouldHaveFired in the child class ?