Skip to content

Commit

Permalink
fix for checkout without pre-selected items
Browse files Browse the repository at this point in the history
Before this, trying to checkout items without a pre-selected one from
the list, would always give a damn message with “0 total”.
  • Loading branch information
cauerego committed Mar 26, 2015
1 parent 93baf13 commit 4c4e503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion squarespace/limiting checkout/limiting-checkout.js
Expand Up @@ -28,7 +28,7 @@
} else {
total = parseFloat($('div.subtotal span.sqs-money-native').text());
}
if (total > parseFloat(minTotal)) {
if (total == 0 || total > parseFloat(minTotal)) {
checkout.trigger('click');
} else {
var warning = $('<div class="sqs-widgets-confirmation-content clear"><div class="title">Unable to Checkout</div><div class="message">'+ warningMessage.replace('%total%', total.toFixed(2)) +'</div><div class="buttons"><div class="confirmation-button no-frame confirm" tabindex="3">Okay</div></div></div>').appendTo(checkout.parent().parent());
Expand Down

0 comments on commit 4c4e503

Please sign in to comment.