ATG 10.2 : Display Coupons on the product details page to assist users during their purchase dynamically

1.5k Views Asked by At

Requirement

I am building an e-Commerce Application in ATG 10.2 where I would like the coupons (item-level discounts only) to be displayed with the product details to attract customers and display the amount they could save using those coupons. Many live sites (not sure in ATG) use this feature already.

Knowledge : As I understand, ATG can only dynamically determine the amount or the discount after pricing the item when the promotions are already added to the UserPricingModels.

If you could share some ideas how to customize this behavior, so that I could show the coupon on the product page and using the promotion linked to the coupon, price the product and display the list price and the amount after discount.

Assumption : Only thing I could think of as of now is to add the coupon's promotion to the user's item pricing models when he views the product details page till the pricing is complete, and then remove it after the price has been displayed. But I am not impressed with my approach.

Note : The price should be displayed as discounted only on the product page, when the customer adds the product to the cart, it gets added with its list price only, the product will get the discount only when the coupon is applied.

2

There are 2 best solutions below

0
On

After studying for a while, I think I have found a solution with minimum customizations. /atg/commerce/pricing/PriceItem Droplet which was can be used for displaying the price of the product, has an optional input parameter named pricingModels (promotions)

If you pass this the pricing will happen as if those pricing Models were available to the customer.

I wrote a custom droplet GetPricingModelsForPricing which when provided with a coupon code, will get the promotion from it and then return a collection of the promotions that need to be applied while pricing. I then passed this collection as the pricing Models to the PriceItem Droplet, which will now give me the discounted price for the product.

So now, I can store the coupon Id that I am going to offer in a product or SKU's attribute and then pass that Id to my custom droplet. If that coupon code exists and has a valid promotion linked to it, I would return a pricing Model's collection. If not, that collection will be an empty set. That collection will be passed to the PriceItem Droplet to return the correct discounted price. This will allow me to display the List Price, Discounted price that customer will get after applying the displayed coupon and the amount the customer will save.

When the item will be added to the cart, the cost will be the list price only, until the coupon is applied.

Please suggest better options if you come across some.

Hope this helps someone in need!

0
On

In this document, http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGMerchandisingUserGuide/html/s1402howpromotionswork01.html

It mentions

You could use the GetApplicablePromotions droplet to identify promotions that apply to particular items, and display this information on the product page. Or you could send an e-mail that describes the promotion, perhaps including a discount coupon code in the message.

You can try this out, however, I have not used it before.