• Resolved rajeshsingh520

    (@rajeshsingh520)


    Hi,

    We want to add the State list geenrated by your plugin in some popup form

    so we will like to know:

    1) how to get required data from your plugin to make the state list

    2) how to save the selected state in the session data so your plugin can pikcup the saved data in the checkout page

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Condless

    (@condless)

    Hi Rajesh,
    The states dropdown can be printed using the [csz_cities] shortcode, when customer select his state it will be saved automatically in the session and will appear in the checkout page.

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Thanks for the prompt reply

    we will be adding this shortcode inside another <form> </form> element that will be on some non checkout page in popup

    will try out your suggestion and let you know if any issue

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Hi,

    It is showing like this https://imgur.com/a/CYM0P7P

    can you tell me which JS file i have to enque on the page so when the popup loads this form value can directly use selectWoo

    right now shortcode is adding them as normal dropdown and not saving the selection in the session as well

    Plugin Author Condless

    (@condless)

    Hi,
    The plugin enqueues those files by default (line 587 in the main plugin’s file):

    wp_enqueue_script( 'selectWoo' );
    wp_enqueue_style( 'select2' );
    wp_enqueue_script( 'wc-country-select' );

    Do you have console errors while inspecting the page?
    Can you try the shortcode on regular page of the website without popup?

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Hi,

    On regular page it works fine but we need it to work inside the popup

    when we open it inside the popup it does not work

    even if we enque this script on our page where popup is going to open it still does not work, your script are not make to work on the dynamically added element

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Hi,

    we managed to get the dropdwon working with our custom JS and PHP for saving the form

    have one more question, our client will be only doing delviery to some limited Cities so we dont want to show all the cities in the drop down how can we limit that

    Plugin Author Condless

    (@condless)

    Hi,
    Thanks for the update,
    The ‘Selling locations’ option (via the plugin settings) will restrict the list to only the cities that was selected in a shipping zone.

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Thanks,

    that option only work to restrict in the checkout page

    the dropdwon that we have added in the Popup still show all the cities, will read the list of cities from the zone and try to make it work thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Addint state list in some other place’ is closed to new replies.