34
34
// JQUERY API (c) Copyright 2009 Jaded Pixel. Author: Caroline Schnapp. All Rights Reserved. Includes slight modifications to addItemFromForm
35
35
36
36
if ( ( typeof Shopify ) === 'undefined' ) { Shopify = { } ; }
37
- Shopify . money_format = '${{amount}}' ;
38
37
39
38
// -------------------------------------------------------------------------------------
40
39
// API Helper Functions
@@ -272,7 +271,7 @@ var ajaxifyShopify = (function(module, $) {
272
271
273
272
// Default settings
274
273
settings = {
275
- debug : true ,
274
+ debug : false ,
276
275
method : 'drawer' , // Method options are drawer, modal, and flip. Default is drawer.
277
276
formSelector : 'form[action="/cart/add"]' ,
278
277
addToCartSelector : 'input[type="submit"]' ,
@@ -281,7 +280,8 @@ var ajaxifyShopify = (function(module, $) {
281
280
toggleCartButton : null ,
282
281
btnClass : null ,
283
282
wrapperClass : null ,
284
- useCartTemplate : false
283
+ useCartTemplate : false ,
284
+ moneyFormat : '${{amount}}'
285
285
} ;
286
286
287
287
// Override defaults with arguments
@@ -343,7 +343,7 @@ var ajaxifyShopify = (function(module, $) {
343
343
$cartCountSelector . html ( cart . item_count ) ;
344
344
}
345
345
if ( $cartCostSelector ) {
346
- $cartCostSelector . html ( Shopify . formatMoney ( cart . total_price ) ) ;
346
+ $cartCostSelector . html ( Shopify . formatMoney ( cart . total_price , settings . moneyFormat ) ) ;
347
347
}
348
348
} ;
349
349
@@ -668,7 +668,7 @@ var ajaxifyShopify = (function(module, $) {
668
668
itemAdd : itemAdd ,
669
669
itemMinus : itemMinus ,
670
670
itemQty : itemQty ,
671
- price : Shopify . formatMoney ( cartItem . price )
671
+ price : Shopify . formatMoney ( cartItem . price , settings . moneyFormat )
672
672
} ;
673
673
674
674
items . push ( item ) ;
@@ -677,7 +677,7 @@ var ajaxifyShopify = (function(module, $) {
677
677
// Gather all cart data and add to DOM
678
678
data = {
679
679
items : items ,
680
- totalPrice : Shopify . formatMoney ( cart . total_price ) ,
680
+ totalPrice : Shopify . formatMoney ( cart . total_price , settings . moneyFormat ) ,
681
681
btnClass : $btnClass
682
682
}
683
683
$cartContainer . append ( template ( data ) ) ;
0 commit comments