Shipping by City.

This topic contains 6 replies, has 2 voices, and was last updated by  Sayan Naskar 2 weeks ago.

  • Author
    Posts
  • #36025 Reply

    d-n-13
    Participant

    Hi wcfm,

    Thanks for the latest shipping updates, it is becoming better and better.

    I’m wondering if it is possible to make shipping is based on cities as well, not just states.

    Side note : woocommerce doesn’t support cities for my country, how to add them ?

    Thank You

  • #36096 Reply

    Sayan Naskar
    Keymaster

    Hello,
    Shipping based on cities support is already added in the WCFM Marketplace.
    To add City Support You need to install the plugin WC City Select ( https://wordpress.org/plugins/wc-city-select/ ) Use the method of associating cities with the states of your country to add the cities you want (It is mentioned in the plugin description page). This will add city Support to Woocomerce.

    Now to enable city support in WCfMmp you need to add the following line in the child themes function.php or in the code snippet plugin.:

    add_filter(‘wcfmmp_city_select_dropdown_enabled’, ‘__return_true’ );

    Again as this is a user-specific requirement we have made this filter based, so you need to enable this feature.

    Thank You.

  • #37077 Reply

    d-n-13
    Participant

    Hello Mr. Naskar,

    I’ve used WC City Select and it worked,

    But the filter did not do anything, when I go to shipping settings I cannot ship by city. https://www.dropbox.com/s/96dfgkmevelv6fv/Shipping.jpg?dl=0

  • #37082 Reply

    d-n-13
    Participant

    Also, after I find solution for this topic, my goal is to achieve solution for the next topic with your help : https://wclovers.com/forums/topic/search-products-by-countries-and-states-shipped-to/#post-37079

  • #37175 Reply

    Sayan Naskar
    Keymaster

    Hello,
    Have you added the code?

    add_filter('wcfmmp_city_select_dropdown_enabled', '__return_true' );

    Moreover, the city restriction works only for shipping by zone. Please find attached screenshot.

    Thank You.

    Attachments:
    You must be logged in to view attached files.
  • #37239 Reply

    d-n-13
    Participant

    Hi,

    yes the code working now,

    As much as I love shipping by zone, I hate that when you limit shipping to a state / city, you cannot ship to it anymore (it won’t be part of everywhere else too) right ?

    That’s why i’m using shipping by country.

    If there is no workaround for that I’ll go back to shipping by country and append city names with state names.

    Thank You

  • #38492 Reply

    Sayan Naskar
    Keymaster

    Hello,
    For now, city restriction is only possible for shipping by zone. We will inform you if we make further changes in the other shipping types.

    Thank You.

Reply To: Shipping by City.
Your information: