Promotion based on Payment Method (ATG Oracle Commerce) ATG11.1

As you know The Promotion engine is powerful and it let you create advanced promotions with the Advanced Promotion template.

This template let you use the order and shipping properties to create the promotion.
However OOTB there is not a way to get a promotion based on the Payment Method, and the reason is due the order can have more than one, in order to make this happen you need to do some changes.

Let's say we want to create a promo to the users that use paypal, or the ones that use visa.

The steps to make this happen are here:

First you need to extend the atg.commerce.order.OrderImpl Class, which is very common when you are doing custom changes to the order definition, and create a method to return the paymentType used on the order.

Then that new class needs to be registered on /atg/commerce/order/OrderTools component as follows:

This is pretty standard order extend customization, however the trick is that the changes we are doing need to be deployed into BCC instance otherwise we won't be able to see the new property paymentType displayed on this advanced Promotion template.

And as you see there is no need to extend orderRepoistory.xml since this is a derived property.

If everything above is done correctly you will be able to see all the properties inside your OrderImpl bean displayed as options in the Advanced promotion template.


No need to change QualifierService or anything else to make this promo work.

All of this is documented at http://docs.oracle.com/cd/E52191_03/Platform.11-1/ATGCommProgGuide/html/s1705addingasubclasswithsimpledatatyp01.html, here mention that you need to extend orderRepository.xml and the reason is becuase this is a generic example, since our payment type can be calculated we did not have to extend the orderRepository.





Comments