• Welcome to KonaKart Community Forum. Please login or sign up.
 
March 23, 2019, 10:16:04 am

News:

KonaKart v8.9 - Released Aug-2018 - see KonaKart website for details


Creating Promtion By API and set Order Total Discount Problem

Started by HappyHippo, February 07, 2018, 04:17:42 pm

Previous topic - Next topic

HappyHippo

Hi,
I am creating promotion using AdminPromotion and setting setOrderTotalCode("ot_total_discount");

AdminPromotion promotion = new AdminPromotion();
promotion.setName(getName());
promotion.setActive(true);
promotion.setOrderTotalCode("ot_total_discount");

On admin contol panel i can see the promotion created with correct promotion type but "Minimum Order Value", "Min total quantity" , "Min quantity for a product", "Discount Type" etc. field of Total Discount module are not set. 

How can i give these value at the time of creating promotion and attach these to the promotion through API?

Thank you very much in advance.

julie

Depending on the promotion being used, KonaKart allows you to define how the attributes of the promotion are interpreted. You need to take a look at custom\modules\src\com\konakartadmin\modules\ordertotal\totaldiscount\TotalDiscount.java to see how the custom attributes of the promotion object are mapped.

e.g. Minimum Order Value is mapped onto custom1

HappyHippo