summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-01-22 02:06:23 +0100
committerJules Laplace <julescarbon@gmail.com>2021-01-22 02:06:23 +0100
commit156de7d1875e0622a1d9d9493cb60be6858c5009 (patch)
tree4db85263c12889b684eea58050d86db44f9df826
parent44c3c894e031f950303725abaafbb70a5f0d2654 (diff)
v1.5.0 fixing cart issues
-rwxr-xr-xStoneIsland/www/css/cart.css2
-rwxr-xr-xStoneIsland/www/js/lib/account/AccountView.js2
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartPayment.js6
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartShipping.js2
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartSummary.js1
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js12
6 files changed, 11 insertions, 14 deletions
diff --git a/StoneIsland/www/css/cart.css b/StoneIsland/www/css/cart.css
index eda4cc82..410f680f 100755
--- a/StoneIsland/www/css/cart.css
+++ b/StoneIsland/www/css/cart.css
@@ -15,7 +15,7 @@
display: flex;
font-size: 1rem;
text-align: center;
- color: #666;
+ color: #888;
width: 33%;
position:relative;
height: 48px;
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js
index af035f6a..a259e8a0 100755
--- a/StoneIsland/www/js/lib/account/AccountView.js
+++ b/StoneIsland/www/js/lib/account/AccountView.js
@@ -81,7 +81,7 @@ var AccountView = View.extend({
}
else {
data.CreditCards.forEach(function(cc){
- this.ccLookup[cc.Id] = cc
+ this.ccLookup[cc.Id || cc.Guid] = cc
}.bind(this))
app.payment.populate( data.CreditCards[0] )
app.cart.payment.populate()
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index 0e4c3b84..76f2a5c4 100755
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -121,7 +121,7 @@ var CartPayment = FormView.extend({
.replace(/{{state}}/g, cc.Province)
.replace(/{{zip}}/g, cc.ZipCode)
- var cc_t = this.cc_template.replace(/{{id}}/g, (cc.Id || i))
+ var cc_t = this.cc_template.replace(/{{id}}/g, (cc.Guid || i))
.replace(/{{checked}}/g, cc.IsDefault ? "checked" : "")
.replace(/{{number}}/g, cc['Number'])
.replace(/{{type}}/g, cc.Type.toUpperCase())
@@ -156,7 +156,7 @@ var CartPayment = FormView.extend({
var card_on_file = {
"guid": cc_data.Guid,
- "cvv": this.$("[name=CvvConfirm]"),
+ "cvv": this.$("[name=CvvConfirm]").val(),
}
app.curtain.show("loading")
@@ -184,7 +184,7 @@ var CartPayment = FormView.extend({
"HolderProvince": address_data.Province,
"HolderZip": address_data.PostalCode || address_data.ZipCode,
"HolderISOCountry": CANADIAN_LOOKUP[ address_data.Province ] ? "CA" : "US",
- "HolderEmail": auth.user.Email,
+ "HolderEmail": auth.user.Email || auth.user.email,
"CardNumber": cc_data['Number'],
"Type": cc_data.Type,
"ExpirationMonth": cc_data.ExpirationMonth,
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index 157e75f5..e6b98c63 100755
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -118,7 +118,7 @@ var CartShipping = FormView.extend({
shipping_info.Name = address_data.Name
shipping_info.Surname = address_data.Surname
- shipping_info.Email = auth.user.Email
+ shipping_info.Email = auth.user.Email || auth.user.email
shipping_info.Phone = address_data.Phone
shipping_info.Mobile = address_data.Phone
shipping_info.StreetWithNumber = address_data.Address
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index 9637ae35..8ae11c0d 100755
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -29,6 +29,7 @@ var CartSummary = ScrollableView.extend({
app.cart.el.className = "summary"
window.location.hash = "#/cart/summary"
app.view = this
+ app.footer.hide()
if (auth.has_cart()) {
this.load()
}
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 34f7927e..d467fbdd 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -236,14 +236,10 @@ var ProductView = ScrollableView.extend({
}
this.$extraMessage.hide()
- if (data['C10Attributes'] && data['C10Attributes'].length) {
- data['C10Attributes'].forEach(function(attr){
- if (attr['Key'] === 'Limited_Edition') {
- this.$extraMessage.html(stripHTML( attr['Value'] ))
- this.$extraMessage.show()
- app.footer.show(stripHTML( attr['Value'] ))
- }
- }.bind(this))
+ if (descriptions['Limited_Edition']) {
+ this.$extraMessage.html(stripHTML( descriptions['Limited_Edition'] ))
+ this.$extraMessage.show()
+ app.footer.show(stripHTML( descriptions['Limited_Edition'] ))
}
this.populate_sizes()