Skip to content

Commit

Permalink
fix(storefront): BCTHEME-512 add translation for invalid quantity val…
Browse files Browse the repository at this point in the history
…ue error on cart
  • Loading branch information
bc-alexsaiannyi committed May 19, 2021
1 parent 02b0c2c commit 288e8db
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Added translation for invalid quantity value error on Cart. [#2062](https://github.com/bigcommerce/cornerstone/pull/2062)
- Fixed displaying swatch name for multiple swatch options on page. [#2040](https://github.com/bigcommerce/cornerstone/pull/2040)
- Added settings for payment banners. [#2021](https://github.com/bigcommerce/cornerstone/pull/2021)
- Use https:// for schema markup. [#2039](https://github.com/bigcommerce/cornerstone/pull/2039)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Cart extends PageManager {
invalidEntry = $el.val();
$el.val(oldQty);
return swal.fire({
text: `${invalidEntry} is not a valid entry`,
text: this.context.invalidEntryMessage.replace('undefined', invalidEntry),
icon: 'error',
});
} else if (newQty < minQty) {
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
},
"label": "Your Cart ({quantity, plural, one {# item} other {# items}})",
"is_empty": "Your cart is empty",
"invalid_entry_message": "{entry} is not a valid entry",
"coupon_code": "Coupon Code",
"discount": "Discount",
"included_in_total": " Included in Total",
Expand Down
1 change: 1 addition & 0 deletions templates/pages/cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
cart: true
---
{{#partial "page"}}
{{inject 'invalidEntryMessage' (lang 'cart.invalid_entry_message')}}
<div class="page">

<div class="page-content" data-cart>
Expand Down

0 comments on commit 288e8db

Please sign in to comment.