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

Commit 78c6f9b

Browse files
committed
Merge pull request #20 from Shopify/v1.1.1
V1.1.1
2 parents d4fb322 + 61a7497 commit 78c6f9b

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

assets/ajaxify.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ Shopify.updateCartNote = function(note, callback) {
135135
Shopify.onError = function(XMLHttpRequest, textStatus) {
136136
var data = eval('(' + XMLHttpRequest.responseText + ')');
137137
if (!!data.message) {
138-
// alert(data.message + '(' + data.status + '): ' + data.description);
138+
alert(data.message + '(' + data.status + '): ' + data.description);
139139
} else {
140-
// alert('Error : ' + Shopify.fullMessagesFromErrors(data).join('; ') + '.');
140+
alert('Error : ' + Shopify.fullMessagesFromErrors(data).join('; ') + '.');
141141
}
142142
};
143143

@@ -547,12 +547,16 @@ var ajaxifyShopify = (function(module, $) {
547547
Shopify.getCart(cartUpdateCallback);
548548
};
549549

550-
itemErrorCallback = function (error) {
550+
itemErrorCallback = function (XMLHttpRequest, textStatus) {
551551
switch (settings.method) {
552552
case 'flip':
553553
$flipContainer.removeClass('flip--is-loading');
554554
break;
555555
}
556+
557+
// This is where you handle errors of products being added to the cart.
558+
// Default to alert message for errors.
559+
Shopify.onError(XMLHttpRequest, textStatus);
556560
};
557561

558562
cartUpdateCallback = function (cart) {

assets/timber.scss.liquid

+11-3
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ body {
651651
}
652652

653653
.main-content {
654-
padding: $gutter*2 $gutter;
654+
display: block;
655+
padding-top: $gutter*2;
656+
padding-bottom: $gutter*2;
655657
}
656658

657659
.left { float: left; }
@@ -1023,12 +1025,18 @@ label.error {
10231025
.input-group-field,
10241026
.input-group-btn {
10251027
display: table-cell;
1026-
vertical-align: top;
1028+
vertical-align: middle;
10271029
margin: 0;
10281030
}
10291031

1030-
.input-group-field {
1032+
.input-group .btn,
1033+
.input-group .input-group-field {
1034+
height: 37px;
1035+
}
1036+
1037+
.input-group .input-group-field {
10311038
width: 100%;
1039+
margin-bottom: 0;
10321040
}
10331041

10341042
.input-group-btn {

config-sample.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# THEME GEM USAGE - visit https://github.com/Shopify/shopify_theme
3-
# Get your api_key and password at your-url.myshopify.com/apps/private
3+
# Get your api_key and password at your-url.myshopify.com/admin/apps/private
44

55
# example code
66
:api_key: 52ba03f2e17a1d24dafe1002b2bcddea

0 commit comments

Comments
 (0)