ajax state list in checkout

Create issue
Issue #1136 resolved
Former user created an issue

When there are only downloadables in the cart, the state list doesn't get updated when the country is changed.

Comments (4)

  1. Tay Ray Chuan

    Thanks for the report.

    Could you try this patch?

    diff --git a/satchmo/apps/satchmo_store/contact/templates/contact/_state_js.html b/satchmo/apps/satchmo_store/contact/templates/contact/_state_js.html
    index 10180ce..1a6868f 100644
    --- a/satchmo/apps/satchmo_store/contact/templates/contact/_state_js.html
    +++ b/satchmo/apps/satchmo_store/contact/templates/contact/_state_js.html
    @@ -18,7 +18,7 @@ jQuery(document).ready(function($) {
     	var satchmo = satchmo || {};
     
     	/* should choices for billing state be the same as those for shipping state? (and vice-versa) */
    -	var CLONE = {% if shop.options.PAYMENT.COUNTRY_MATCH.value %}true{% else %}false{% endif %};
    +	var CLONE = {% if shop.options.PAYMENT.COUNTRY_MATCH.value and cart and cart.is_shippable %}true{% else %}false{% endif %};
     
     	var hook_country_field = function(params) {
     		params.country.change(function() {
    
  2. Tay Ray Chuan

    Merge fix for ContactInfoForm's JavaScript

    It couldn't handle situations where the shipping fields weren't present/cart wasn't shippable.

    Fixes #1136.

    Reported-by: davis

    • rc/fix-checkout-noship-js: _contact_info_form_js: shift code that require shipping fields _contact_info_form_js: move semi-colon into block _contact_info_form_js: remove space after condition _contact_info_form_js: move name_change into satchmo namespace satchmo_checkout.js: modify file to be {% include %}-able satchmo_checkout.js: whitespace changes

    f7d015438dfe

  3. Log in to comment