How to setup having different amounts for free shipping?

Top WooCommerce & WordPress Plugins Forums Amount Left for Free Shipping for WooCommerce How to setup having different amounts for free shipping?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #88461
    Yavuz
    Participant

    I have a store that uses Flatsome as theme, which has several regions where different amounts are defined for free shipping.

    Would this work with such site? Would we be able to show the “Amount left for Free Shipping” in the Minicard, Card and Checkout pages?

    How would the addon detect where the user comes from?

    #88462
    Moshtafizur
    Moderator
    Plugin Support

    Hello Yavuz,

    Thanks for reaching out.

    > Would this work with such site?

    Our plugin should work with the Flatsome theme too. However, if you encounter any difficulties, please let us know. We’re here to assist.

    > Would we be able to show the “Amount left for Free Shipping” in the Minicard, Card and Checkout pages?

    Yes, you definitely can. To do so, go to the plugin’s settings and enable the Cart, Mini-cart, and Checkout sections, respectively.

    > How would the addon detect where the user comes from?

    The user can set his shipping zone manually from the cart page, or you can use the WooCommerce Geolocation function. WooCommerce enables shop owners to automatically geolocate clients and provide shipping options according to their location. You can learn more about this function here.

    Now, if you’re using the default free shipping from WooCommerce, the plugin will try to automatically sync with different shipping zones in order to display the appropriate free shipping message for each zone.

    I hope this information was helpful to you.

    #112528
    Mátraházi Péter
    Participant

    Dear Moshtafizur,

    We have enabled and set up the manual amounts for different user roles (customer, retailer), shipping zones (Italy) and methods (“flat rate GLS” and “free delivery”).

    In our example a customer can get free shippping from € 75, but a retailer from € 200 (but he has a discount on prices and has a bigger box to deliver).

    From zero to € 75 everything works fine, the amount for free delivery is showing everywhere, and the default flat rate (GLS) shipping is added to the order in any case.

    From € 75 – 200 a strange bug appears for retailers: the amount left is showing as it should, but the shipping option is already changed to free delivery.
    For normal customers it works fine, because they already reached their amount.

    Over € 200 it works fine for retailers too.

    So it seems like the default minimum amount (75) is somehow still affecting the shipping table display for users with higher min amounts (200).
    I tried to play around with the options without success eg. set the min amount to 200, but then it added the GLS post cost and displayed free delivery reached.

    Is it an error of the theme we use (a child of Naturally by Ninetheme) or might be a bug in the plugin?

    Thank you, any help is much appreciated!

    #112565
    Mátraházi Péter
    Participant

    I found the reason for the bug. There was a code snippet in the child theme’s function php that was hiding the flat rate option if free shipping amount was reached:

    /**
    * @snippet Hide ALL shipping rates in ALL zones when Free Shipping is available
    * @author Rodolfo Melogli
    */

    add_filter( ‘woocommerce_package_rates’, ‘bbloomer_unset_shipping_when_free_is_available_all_zones’, 9999, 2 );

    function bbloomer_unset_shipping_when_free_is_available_all_zones( $rates, $package ) {
    $all_free_rates = array();
    foreach ( $rates as $rate_id => $rate ) {
    if ( ‘free_shipping’ === $rate->method_id ) {
    $all_free_rates[ $rate_id ] = $rate;
    break;
    }
    }
    if ( empty( $all_free_rates )) {
    return $rates;
    } else {
    return $all_free_rates;
    }
    }

    But unfortunately now we are having an issue with the flat rate shipping not disappearing when the free amount reached, even though it is set in the admin. Does anyone have some advice on that? Thank you!

    #112680
    Moshtafizur
    Moderator
    Plugin Support

    Hi Mátraházi,

    Thank you for bringing the issue to our attention. We apologize for the inconvenience caused by the bug you encountered with our website. I have escalated this issue to our development team and they will be looking into it as soon as possible.

    We assure you that we will do our best to resolve the issue and get back to you with a solution as soon as possible. In the meantime, if you have any further queries or concerns, please do not hesitate to reach out to us.

    Thank you for your patience and understanding.

    Kind regards,
    Moshtafizur

    #113578
    Pablo
    Moderator
    Plugin Support

    Hi @matrahazi-peter ,

    Sorry for the delay, but I have good news.

    I believe the other shipping methods were not getting hidden only on AJAX requests and I tried to fix that on version 2.2.6 I just released.

    Please, update the plugin and let me know if it helps.

    #114158
    Peter
    Participant

    Dear Moshtafizur,

    Thank you for the update, everything seems to be working fine.

    It’s much appreciated, keep up the good work!

    #114200
    Moshtafizur
    Moderator
    Plugin Support

    Hi Peter,

    We are happy to help you.

    If you liked the support, then please consider leaving a review here.

    Kind regards,
    Moshtafizur

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.