Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Jun 2016 04:34 PM by  Steve L
Subdivision Lookups
 5 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages


New Member


Posts:
New Member


--
19 May 2016 01:42 PM

    Any harm in deleting subdivision codes from the lookup table? If necessary, can they be put back later without harm?

    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    19 May 2016 03:33 PM

    Hi Peter,

    By lookup table, did you mean the DNN Lists table or the resx file? What is the reason you want to delete them?

    0


    New Member


    Posts:
    New Member


    --
    19 May 2016 03:36 PM

    I want to eliminate all subdivisions in the dropboxes on checkout template associated to 'US' that are not in lower 48 states.

    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    19 May 2016 04:07 PM

    Deleting in the resx file or lists table won't remove the item from showing up. You need to use Javascript to remove the few entries in the dropdown. Alternatively, it might be easier to simply rename those few states with a label next to the state name e.g. "Alaska (Cannot ship)" and then add the Availability rule in your Checkout to actually restrict those states from checking out.

    As a separate note, the next Storefront release is normalized with the new country and regions lists in DNN to help make text localization easier. In addition, you will be able to easily unselect countries that you don't need and set your default country. However, subdivisions (regions) will still behave pretty much the same way as today since we didn't get the chance to program that deep. You cannot remove regions without using custom display template.

    0


    New Member


    Posts:
    New Member


    --
    19 May 2016 04:18 PM

    Before I created this forum post I tried js in the template. That's why I wanted to delete from the datasource. Didn't realize it wasn't in a db table.

    Tried the following js in the checkout template. It did not work. All subdivisions were in the dropdown for US. There are many more that 50 subdivisions for 'US' BTW:

    <asp:Panel ID="BillingAndShippingPanel" runat="server" CssClass="dnnForm">
    <script type="text/javascript">
    function pageLoad(sender, args){
    jQuery("select[id$='BillingCountryDropDownList'] option[value!='US']").remove();
    jQuery("select[id$='ShippingCountryDropDownList'] option[value!='US']").remove();
    jQuery("select[id$='BillingSubdivisionDropDownList'] option[value='AK']option[value='HI']").remove();
    jQuery("select[id$='ShippingSubdivisionDropDownList'] option[value='AK']option[value='HI']").remove();
    }
    </script>


    0
    You are not authorized to post a reply.
    Page 1 of 212 > >>