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

New Shipping Module

Started by Asset, September 09, 2013, 03:15:24 pm

Previous topic - Next topic

Asset

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 ?

bharatkasodariya


Asset

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 ?


bharatkasodariya

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.

Asset

i dont check on anything in my shipping module , so what do you mean by shipping criteria ???

bharatkasodariya

I mean verify is your shopping module code executing? because you can get value only after shipping code execution.

bharatkasodariya

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"