Vulnerability in EPiServer.Forms
I just started to implement the new promotion engine and the built in promotions suits me good enough but I would like to add an Xhtml property to all the built in promotions.Is that doable without overriding everyone of them like this example shows?http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-Commerce/9/Marketing/new_promotions/Or maybe you could add a "MainBody" Xhtml property by default?
I would like to have one text in listings and another on the page where you can read about the promotion item. Of course I could use first 200 chars in listings from Description and use all of it in the presentation but a property of its own would be best.
Unfortunately no, there is no other way than to add your PromotionData types which inherit from the default ones.
I had this question a while back as well. It seems like there is no simple way of doing this. This seems to be pretty much in line with how other episerver content types work though - you need to extend the base class to be able to add your own fields to them, be it ProductContent, VariationContent or any of the promotion content types.It's of course a bit more of hassle in this context since you have to do it for all of them, and new ones might be added with updates.Something that helps is if you define an interface that defines the extra fields that all your extended promotions should have, then you have your extended promotions implement that interface. This helps in the future if you need to add more fields and don't want to forget about adding it to one of your extended promotion classes.Other than that, remember that there, from v10.1 or higher, is a way do "hide" all the built in promotions so that there aren't two of each (your extended and the original one) when you open the create promotion dialog:http://world.episerver.com/documentation/developer-guides/commerce/marketing/hiding-promotion-types/
Thanks, then I will go for the 200 chars solution.
Thanks Jafet! I will check with my customer. If they only want to use 4-5 of the built in promotions I could disable all and make my own with the built is as base class. We'll se.