• Resolved cecofuli

    (@cecofuli)


    Hello

    I’m going to add shipping cost to my little e-commerce.
    I have a special group for “difficult” island, like Baleari, Ceuta, Melilla (spanig island). In this group, the shipping cost for 2KG of product will be higher, as 30 euro.

    For Spain “only” 18 euro.

    The problem is that, “Ceuta or Baleari, in the cart drop-down menu, are under “Spain” and the shipping cost will be like for Spain (18 euro) and not 30 euro… Why? It’s weird…

    Look at the picture

    View post on imgur.com

    How can I fix that? How can I solve this problem?

    Thank you

    • This topic was modified 5 years, 9 months ago by cecofuli.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter cecofuli

    (@cecofuli)

    Ok, I don’t know if I did the right step.
    I’m sorry, but I’m very newbie…

    I have found this tutorial:

    https://misapuntesdigitales.com/quitar-provincias-o-comunidades-en-woocommerce/

    And they suggest… to remove the Spanish province!!! ^__^
    Ok, it’s not the most elegant solution but… if someone will really need my product in Las Palmas (ES), they will write me an e-mail ?? .
    what do you think about my idea?

    The code has some part in Spanish language and I didn’t know if it work in my ITA version… What do you think’ It seems yes…

    add_filter('woocommerce_states', 'quitar_provincias');
    function quitar_provincias( $states ) {
        unset($states['ES']['PM']); 
    	unset($states['ES']['TF']);
        unset($states['ES']['GC']);
        unset($states['ES']['CE']);
        unset($states['ES']['ML']); 
    
    return $states;
    }

    What’s your opinion?

    • This reply was modified 5 years, 9 months ago by cecofuli.
    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @cecofuli,

    I presume that you have a shipping zone for Spain set up. I don’t see that reflected in your screenshot.

    You will want to make sure that your “Gruppo 5” shipping zone is placed higher than your shipping zone for Spain so that it will be triggered.

    Shipping zones are processed from top to bottom and if the address is found in your shipping zone that covers Spain, the Gruppo 5 zone will never be activated.

    Thread Starter cecofuli

    (@cecofuli)

    OH…

    I didn’t know this rule but..

    Ceuta, Melilla are region of Spain!

    So, if you want to choose Ceuta or Melilla, you must to choose Spain and, then in the province dropdown menu: Cuta, Melilla, Las Palmas and Baleari.

    But, these area are ISLAND and the shipping cost are way more expensive!
    So, I didnt’ know how to set-up these place. Especially because Las Palmas and Baleari are not present as a country.

    So, my solution was to use the CODE I worte you and remove they.

    If someone from these are really need my product, they can write me an email.

    =)

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @cecofuli,

    As I mentioned before, if you want to provide a shipping cost for these islands that is different from the cost for Spain, the more specific shipping zone needs to be above the more general one:

    Here’s a screenshot showing what I mean: https://cld.wthms.co/Mh3ZI1

    This will allow those Islands to be processed independently of the rest of Spain.

    I’ll go ahead and mark this thread as resolved.

    Thread Starter cecofuli

    (@cecofuli)

    Ohhh..

    it’s a nice tip!

    But, in WooCommerce I don’t see also “Las Palmas” and “Baleari” as a single state.
    And the shipping cost for these islands is almost double than Spain.

    What do you suggest me?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Discrepancy between shipping cost settings and cart for some island…. STRANGE!’ is closed to new replies.