Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Make sure strings are escaped properly
Browse files Browse the repository at this point in the history
  • Loading branch information
cshold committed Nov 11, 2014
1 parent 85bc5e5 commit 551eafd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/shop.js.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ timber.productPage = function (options) {
if (variant.available) {
// Available, enable the submit button, change text, show quantity elements
$addToCart.removeClass('disabled').prop('disabled', false);
$addToCartText.text({{ 'products.product.add_to_cart' | t | json }});
$addToCartText.html({{ 'products.product.add_to_cart' | t | json }});
$quantityElements.show();
} else {
// Sold out, disable the submit button, change text, hide quantity elements
$addToCart.addClass('disabled').prop('disabled', true);
$addToCartText.text({{ 'products.product.sold_out' | t | json }});
$addToCartText.html({{ 'products.product.sold_out' | t | json }});
$quantityElements.hide();
}

Expand All @@ -154,7 +154,7 @@ timber.productPage = function (options) {
// To only show available variants, implement linked product options:
// - http://docs.shopify.com/manual/configuration/store-customization/advanced-navigation/linked-product-options
$addToCart.addClass('disabled').prop('disabled', true);
$addToCartText.text({{ 'products.product.unavailable' | t | json }});
$addToCartText.html({{ 'products.product.unavailable' | t | json }});
$quantityElements.hide();
}
};
Expand Down

1 comment on commit 551eafd

@carolineschnapp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! 🚢

Please sign in to comment.