KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: Asset on September 09, 2013, 03:15:24 pm

Title: New Shipping Module
Post by: Asset on September 09, 2013, 03:15:24 pm
Dears ,
I am trying to add a new shipping module , so i followed the sample of Flat.java and generated a jar file for the new shipping method and added it to the konakart admin,.
I have changed the staticdata class to contain 4 fields and added these entries to the database as well

My Question now , you load configurations statically in the Sample code under Custom , so where should they will be loaded from the database , and when i change one of my staticData and then click save ...why they aren't updated on DB ?
Title: Re: New Shipping Module
Post by: bharatkasodariya on September 10, 2013, 06:19:01 am
have you added shipping module entry in konakartadmin.properties
Title: Re: New Shipping Module
Post by: Asset on September 10, 2013, 04:04:28 pm
yeah i did  in both konakart.properties and konakartadmin.properties , i just adjusted some keys in the DB and it worked ,  but i do have another issue :

the shipping is always zero from front application when i install my new module , and when calling this line

            ShippingQuoteIf [] shippingQuotes = kkAppEng.getOrderMgr().getShippingQuotes();

it doesn't return my module , any idea why ?

Title: Re: New Shipping Module
Post by: bharatkasodariya on September 12, 2013, 09:55:22 am
make sure your shipping module is enabled. And your cart should match with your shipping criteria.
You can put some log statement in your custom module to verify your custom shipping calculation.
Title: Re: New Shipping Module
Post by: Asset on September 12, 2013, 10:14:34 am
i dont check on anything in my shipping module , so what do you mean by shipping criteria ???
Title: Re: New Shipping Module
Post by: bharatkasodariya on September 12, 2013, 02:00:23 pm
I mean verify is your shopping module code executing? because you can get value only after shipping code execution.
Title: Re: New Shipping Module
Post by: bharatkasodariya on September 13, 2013, 06:14:57 am
To get shipping related value from the order on frontend, can use below code
OrderTotalIf[] ot=kkAppEng.getOrderMgr().getCheckoutOrder().getOrderTotals();

find element from the array with class name "ot_shipping"