• Welcome to KonaKart Community Forum. Please login or sign up.
 

Creating Promtion By API and set Order Total Discount Problem

Started by HappyHippo, February 07, 2018, 11:17:42 am

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