Skip to content

Commit

Permalink
BIG-25580: Add city field support to shipping estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
theromulans committed Feb 4, 2016
1 parent cd0b473 commit 6bf7054
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/theme/cart/shipping-estimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export default class ShippingEstimator {
const params = {
country_id: $('[name="shipping-country"]', $estimatorForm).val(),
state_id: $('[name="shipping-state"]', $estimatorForm).val(),
city: $('[name="shipping-city"]', $estimatorForm).val(),
zip_code: $('[name="shipping-zip"]', $estimatorForm).val(),
};

Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"select_a_country": "Country",
"select_a_state": "State/province",
"estimate_shipping": "Estimate Shipping",
"suburb_city": "Suburb/city",
"zip_postal_code": "Zip/postcode",
"free_shipping": "Free shipping",
"hide_ups_rates": "Hide UPS Rates",
Expand Down
7 changes: 7 additions & 0 deletions templates/components/cart/shipping-estimator.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
</select>
</dd>

<dt class="estimator-form-label">
<label class="form-label" for="shipping-city">{{lang 'cart.shipping_estimator.suburb_city'}}</label>
</dt>
<dd class="estimator-form-input">
<input class="form-input" type="text" id="shipping-city" name="shipping-city" value="{{selected_city}}" placeholder="{{lang 'cart.shipping_estimator.suburb_city'}}">
</dd>

<dt class="estimator-form-label">
<label class="form-label" for="shipping-zip">{{lang 'cart.shipping_estimator.zip_postal_code'}}</label>
</dt>
Expand Down

0 comments on commit 6bf7054

Please sign in to comment.