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

configuring zone shipping module

Started by Anni, November 28, 2007, 12:35:21 pm

Previous topic - Next topic

Anni

hi everyone,

I've added four different shipping zones for this module. three of them have specific countries, the fourth would be every country that isn't included in the other zones.
is there a short way to specifying this or do I have to insert all remaining country codes individually for the last zone?

regards,
anni

julie

Hi Anni,

At the moment if the country doesn't exist in one of the defined zones, an exception is thrown to signal to the customer that shipping isn't available to that country.

If you do indeed ship everywhere then your best bet is to edit the source code of Zones.java (com.konakart.bl.modules.shipping.zones) to not throw this exception.

At the moment the code looks like :

Quote
        // Get the zone
        Integer Zone = (Integer) countryToZoneMap.get(shippingCountry.getIsoCode2());
        if (Zone == null)
        {
            quote.setResponseText(rb.getString(MODULE_SHIPPING_ZONES_INVALID_ZONE));
            throw new KKException("The delivery address is not within a valid shipping zone");
        }


What you could do is to default to your fourth zone instead of throwing an exception.

Regards,

Julie

Anni

hi julie,

thanks for the answer. I've tried that and replaced the exception with:

Zone = new Integer(4); //formerly: Zone = 4;

but now I constantly get a numberFormatException. do you maybe start with 0 (e.g. 0=zone 1, 1=zone 2 etc.)? or could there be another problem?

regards, anni

julie

It should start with one. You by taking a look in the configurations table in the database you should see configurations that look like MODULE_SHIPPING_ZONES_COUNTRIES_1, MODULE_SHIPPING_ZONES_HANDLING_1, MODULE_SHIPPING_ZONES_COST_1 and then _2, _3 etc.

Regards,

Julie

Anni

ok,

but then, what could cause the problem?

julie

I'm not sure. You should track down where you get the exception and attempt to debug it.

-Julie

Anni

...just an idea. I've inserted the weight/costs for each zone with the admin app. but to make it better readable I always entered a space before the next value. may I do that or would the space be regarded as an invalid number?

Anni

deleting the spaces solved the issue with the exception but the shipping method still isn't displayed ??? before, I just thought this was due to the exception but now everything should work but nothing really changed ...

Anni

restarting tomcat today made the shipping method show up ... but only for the primary address. when I select another delivery address, I only get the other available options...

another thing I noticed is, when you refresh the site, the primary address is selected again. can I change that somehow?

furthermore (might be a bug), the product weight isn't calculated correctly. for my testing I had two products in my cart - the weights are 1kg and 0.5kg. the shipping cost was calculated for 4.5kg although it should have taken the one for 1.5kg. and the displayed shipping cost was the one for packets of 5kg??? somehow that's a complete mix up ...

I'd be grateful for any comments or ideas to that problem.

regards,
anni

Anni

the weight calculation problem seems to be with the item that's only 0.5kg. if I only have one of those in my cart, the weight displayed at checkout is 3.5kg...

Anni

ok, found the problem with the calculation. it generally added 3kg to each package.

for the original topic: just letting the zone default to 4 if no corresponding country is found doesn't work for me  :'(

regards,
anni

trevor

Quote
ok, found the problem with the calculation. it generally added 3kg to each package.


That's the weight of the packaging material and can be configured in the admin app ( configuration>>shipping/packaging ).

Quote
for the original topic: just letting the zone default to 4 if no corresponding country is found doesn't work for me 


You need to debug the module to figure out what is happening in your case.

ryanlynch

Quote from: Anni on November 28, 2007, 02:56:52 pm
hi julie,

thanks for the answer. I've tried that and replaced the exception with:

Zone = new Integer(4); //formerly: Zone = 4;

but now I constantly get a numberFormatException. do you maybe start with 0 (e.g. 0=zone 1, 1=zone 2 etc.)? or could there be another problem?

regards, anni


I found the answer to this and it's not related to the new Integer(4).

NumberFormatException happens when the Zone n Handling Fee = null in the Admin App Modules/Shipping. Zone n Handling Fee has to have an int value.

This should probably be addressed in the next release.. it was pretty hard to track down.