Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Adding a Discount element to Ecommerce Module View modes: 
User avatar
Member
Member
JG - 10/18/2011 2:02:40 PM
   
Adding a Discount element to Ecommerce Module
So there are two discounts in the E-commerce Module, Discount Coupon and Discount Level. I want to add a third one that shows a discount on the product detail page and call it Product Discount like so:

Price: $29.00
Sale Price: $9.00

I've found where to add the elements in the Site Manager to the Ecommerce Module. (Site Manager--> Development --> Modules --> Edit Ecommerce --> User Interface Tab--> Discounts)

My question is this: is there any documentation or previous forum posts that explains how to create the pages like Discount Coupon located here ~/CMSModules/Ecommerce/Pages/Tools/DiscountCoupon/ or any documentation in general on creating elements in modules?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 11/5/2011 12:32:40 PM
   
RE:Adding a Discount element to Ecommerce Module
Hi,

Since version 6.0, you can easily add more discounts to the product, although it still requires some customization.

At first I would recommend you to read the Blogpost by our Ecommerce module tech.leader Petr Vozak about new customization model in version 6: devnet.kentico.com/Blogs/Petr-Vozak/October-2011/E-commerce-6--New-customization-model.aspx

Then, you will be able to add a custom field to the product system table and in the custom provider you could check if the second discounted price is available and use that one instead of the full price during the checkout process.
Rendering the price is a matter of transformations.

You can check the code in the sample providers bundled with the CMS installation, the alternative price example can be seen in \App_Code\CMSModules\Ecommerce\Samples\CustomSKUInfoProvider.cs
There is an override method GetSKUPriceInternal, your code would be just slightly different.

Should you need any additional details, please feel free to ask.

Regards,
Zdenek C.