• Resolved samisraeli

    (@samisraeli)


    Hi,

    I would like to calculate shipping cost by city.
    We ship it only domestic.
    Each city has different fee.
    User select his destination city and the in the checkout page it calculates automatically the shipping cost.
    The customer doesn’t know the zip code.
    Is it possible to configure it on the shipping settings?
    e.g:
    city a > cost $10
    city b > cost $15
    city c > cost $20
    Thank you,

    Sam

Viewing 10 replies - 1 through 10 (of 10 total)
  • Stef

    (@serafinnyc)

    Are you saying the customer will never know their zip code? That’s pretty much a required element. Let me know if that’s what you meant to say.

    Either way you could possibly get away with using Table Rates.

    I have been using distance-rate-shipping plugin for similar purpose. It is backed by woocommerce.

    Good luck

    John

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Within WooCommerce, the best way to manage this is to set the zipcodes per city. For example, if City A has zipcodes of 00000-10000, then you’d fill that into the shipping zone settings:

    Cities by zipcode
    Link to image: https://cld.wthms.co/dbJAR4

    If you specifically need to link to the city as filled in by the customer at checkout, then you could try this plugin:
    https://booster.io/features/woocommerce-shipping-methods-by-cities/

    @zhuzh1 mentioned Distance Rate Shipping, which would work you look at it as distance rather than specifically the city. If city A is 10 km away, city B 20 km, and city C 30 km, that would work well. Here’s more information on the plugin:
    https://woocommerce.com/products/woocommerce-distance-rate-shipping/

    I hope that helps you in the right direction!

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @samisraeli

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

    Hello Guys, I have the same problem.
    I do live in Santiago de Chile and just want (so far) to sell and ship in Santiago. However, Santiago is divided into 12 districts (each one has its own zip codes) and I would like to set a different shipping cost for every district.
    When i use the method described by Hannah (city A would be in my case “District 1”, city B, district 2, and so on..) when se customer gets to the checkout, by default, the shipping cost is always the value related to Distric 1 (because I gues this is the first in the list)
    How can I solve the issue?

    Kind regards!
    Laurent

    fiezie92

    (@fiezie92)

    I’m also having this issue. How can I add cities to shipping zones please. I’ve been searching Google all day for budget friendly options but WooCommerce Table Rate Shipping Pro is the only option I’m seeing so far and the price is waaay out of my existing budget at the moment. Please help guys. I don’t mind if I have to code. I only need the city option for one city at the moment.

    Stef

    (@serafinnyc)

    @llaffitte and @fiezie92 you should really start your own forum issue posts. Coming in on someone else’s posts won’t help you get the assistance you need.

    When posting your own support will be notified faster.
    If the suggestion that one of the posters and @fernashes offered doesn’t work then please start your own posts.

    Same problem, woocommerce doesn’t have an option to add custom location and calculate shipping cost by it.

    There are many regions which are far away and needs divided shipping within states.
    For those who still facing problem, below solution may work.

    I added custom states in specific countries using below

    Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme.

    Add your own or modify shipping states in WooCommerce.

    Note: You must replace both instances of XX with your country code. This means each state id in the array must have your two letter country code before the number you assign to the state.

    /**
     * Add or modify States
     */
    add_filter( 'woocommerce_states', 'custom_woocommerce_states' );
    
    function custom_woocommerce_states( $states ) {
    
      $states['XX'] = array(
        'XX1' => 'State 1', 
        'XX2' => 'State 2'
      );
    
      return $states;
    }

    Source – Add / Modify States woocommerce

    I have a local postcode for eg 1234
    and in this postcode there is 20+ different towns.
    I would like to have Woocommerce detect the city name from the shipping and allocate a charge based on a list.

    town1 = free
    town2 = free
    town3 = $5
    town4 = 10

    is something like this possible?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Calculate shipping cost by city’ is closed to new replies.