Support » Plugin: WooCommerce » calculate shipping by city

  • Resolved abdull85

    (@abdull85)


    Hello there,

    I have seen this topic https://wordpress.org/support/topic/calculate-shipping-cost-by-city/

    it did not help

    I want to cancel the zipcode since most customers here have no idea what their zipcode is,, we are in a country that ppl do not use their zipcode

    so instead of zip code I want the shipping cost by cities (dropdown)

    I have looked, I saw some plugins but i am not sure which one would give me what i am looking since all of them cost money I do not want to buy

    Please I need help

    Thank you
    Abdullah

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @abdull85,

    Got a few questions for you, to help better understand what you are wanting to achieve. ๐Ÿ™‚

      How are you planning on shipping costs being calculated?
      Is there a shipping method that you want to add to your shipping zones based on the city selected?
      Are you selling to multiple countries, or just a single one (and which country)?
      Do you need to keep the ‘State’ option?
    abdull85

    (@abdull85)

    okay we have three payment methods ( COD, Visa and similar to bank transfer)

    we are based on saudi and only shipping here, so ppl are not really using their zip code. the cost of delivering an item in my city is less than other cities in saudi, so alot of times they use the wrong zipcode and pay by visa so we have to refund them and this is waste of time and money. so best option for us is by Cities

    city A shipping cost is 10SAR
    City B shipping cost is 20SAR
    city C shipping cost is 30SAR

    and no need for stat just city name is enough. so by city

    abdull85

    (@abdull85)

    and yes there are three kind of shipping methods

    city A only by us
    City B and C only by shipping company like SMSA and Armex or fedex

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    Thanks for clarifying that, @abdull85. If you don’t want to purchase a plugin, the easiest approach to do this yourself might be to add the cities as “States” for Saudi Arabia- similar to what is discussed here– then remove/hide the City and Zip code fields if you want.

    After that, you can create individual Shipping Zones for each of those City options and add the shipping methods/costs to each separately.

    abdull85

    (@abdull85)

    I do not mind buying a plugin but i am not sure which plugin would give me what i am looking for if you have a good option please let me know

    I want a plugin to cancel the zipcode and put it in either state or city and make it as dropdown if possible ๐Ÿ˜€

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    I’m not sure of a single plugin that can do all of that, but removing the checkout fields is pretty easy– so finding a plugin that can handle the city-based shipping rates is most important.

    If you find a paid plugin that looks like what you are looking for, I would suggest contacting the developer and asking any questions that you might have before purchasing it- to make sure that it does what you need and they can answer any other questions that you might have (and maybe even help with the field removal too!).

    abdull85

    (@abdull85)

    okay actually i tried putting names of city on the postcode and it works perfect so i just need to make the postcode as dropdown and change the name form “postcode” to “city”

    any idea how to make the postcode as dropdown ๐Ÿ˜€

    I tried this but it is not calculating the shipping cost correctly

    add_filter( ‘woocommerce_default_address_fields’ , ‘customize_postcode_fields’ );
    function customize_postcode_fields( $adresses_fields ) {

    $adresses_fields[‘postcode’][‘type’] = ‘select’;
    $adresses_fields[‘postcode’][‘options’] = array(
    ” => __(‘ุงุฎุชุฑ ุงู„ู…ุฏูŠู†ุฉ’, ‘woocommerce’),
    ‘option_1’ => ‘KOBAR’,
    ‘option_2’ => ‘QATIF’,
    ‘option_3’ => ‘123123’
    );

    return $adresses_fields;
    }

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    One of the reasons that I suggested adding the cities as ‘States’ is that it should make it easier to set up the shipping zones for each one- and it already uses the dropdown too. When creating shipping zones, are you able to see the cities you created?

    abdull85

    (@abdull85)

    okay I just got it right with the stat

    Thank you ๐Ÿ™‚

    • This reply was modified 1 year ago by abdull85.
    abdull85

    (@abdull85)

    Thank you for your helpe, you saved my business some money ๐Ÿ˜€

    abdull85

    (@abdull85)

    quick question how do i override the file states.php ?

    it did not work i only could make it work on i actually change on the actual file but once there is update all changes will go as you know

    I did
    1- /wp-content/themes/oceanwp-child/woocommerce/i18n/states.php
    2-/wp-content/themes/oceanwp-child/woocommerce/states.php

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @abdull85 – Try following the instructions in this doc and see if that works.

    abdull85

    (@abdull85)

    ๐Ÿ˜€ Thanks Shaun .. worked

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    Nicely done, Abdullah! So glad to hear it!! ๐Ÿ˜€

    Hi @abdull85

    I have the same issue, i want to setup Free Shipping to specific City (Jeddah).

    Can you please share how did you solve this issue.

    Thanks & regards.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘calculate shipping by city’ is closed to new replies.