Support » Plugin: Weight/Country Shipping for WooCommerce » Shipping rate for 0 kg

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author bobbingwide

    (@bobbingwide)

    Hi, it would be nice if you could specify shipping charges for 0 weight and have the system calculate something. You current workaround is to set the weight to a very small number. e.g. 0.0001

    Thread Starter mhenschel

    (@mhenschel)

    I’ll do the workaround. Will you enhance the plugin eventually?

    Michael

    Thread Starter mhenschel

    (@mhenschel)

    Hi,
    I was trying to modify your plugin (with my general programming skills), but without success. From logic, it seems rather simple.

    For example I could just add a small number (+0.001) in your plugin code here:
    ‘$weight = $woocommerce->cart->cart_contents_weight+0.001;’
    or here
    ‘$weight = $weight+0.01;’
    or comment this line of code
    ‘/*if($weight == 0) return 0; // no shipping for cart without weight*/’

    From a logical viewpoint this should all make it possible to calculate a shipping rate even for products without weight, but it doesn’t. Where is the hidden secret?

    Michael

    Plugin Author bobbingwide

    (@bobbingwide)

    The last change should have worked.
    Did you visit WooCommerce > System Status > Tools and select Clear Transients to clear the cached rates?

    Thread Starter mhenschel

    (@mhenschel)

    I cleared the transients and now it worked. I was already getting desperate because my logical thinking didn’t lead anywhere.

    So that was an easy enhancement. I suggest you include this change into an update because it just doesn’t make sense to include the weight for items that weigh a few gramms if your sending with parcels and your mostly dealing with weights of a few kg.

    And actually I’m “misusing” your plugin now anyway because I’m offering flat rate shipping independent on weight but depending on countries.

    Michael

    Plugin Author bobbingwide

    (@bobbingwide)

    The next version will support shipping charges for zero weight.
    I’m also considering shipping charges for country group 0 – which is used for any other country not listed in the given country groups.

    Having to clear transients all the time can be rather annoying.

    Plugin Author bobbingwide

    (@bobbingwide)

    Version 1.0.5 now supports calculating shipping charges for zero weight carts AND default shipping charges defined for Country Group 0

    Plugin Author bobbingwide

    (@bobbingwide)

    Belated closing as resolved

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Shipping rate for 0 kg’ is closed to new replies.