]> _ Git - fluidbook-html5.git/commitdiff
wip #1927 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Apr 2018 13:18:04 +0000 (15:18 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Apr 2018 13:18:04 +0000 (15:18 +0200)
js/libs/fluidbook/cart/fluidbook.cart.remarkable.js
js/libs/fluidbook/fluidbook.nav.js

index cd2ef9b704c90a0dfce2f41a0a8bdd7fe6ae3ca6..d8bf05e3c05bb27e9c855bdf67a604e6f58912bd 100644 (file)
@@ -214,7 +214,7 @@ FluidbookCartRemarkable.prototype = {
         res += '<input type="text" name="billing_zip" placeholder="Code postal" pattern="[0-9]{5}" tabindex="106" required>';
         res += '<input type="text" name="billing_city" placeholder="Ville" tabindex="107" required>';
         res += '</div>';
-        
+
         res += '<div class="col col-right">';
         res += '<p>Adresse de livraison - Enseigne (si différente) : </p>';
         res += '<input type="text" name="shipping_company" placeholder="Nom de la société"  tabindex="108">';
@@ -243,7 +243,7 @@ FluidbookCartRemarkable.prototype = {
             "<br>\n" +
             "<br>\n" +
             "LIVRAISON<br>\n" +
-            "Livraison 48 h par transporteur<br>\n" +
+            "Livraison 72 h par transporteur<br>\n" +
             "<br>\n" +
             " <br>\n" +
             "<br>\n" +
@@ -294,12 +294,17 @@ FluidbookCartRemarkable.prototype = {
             fp = 8.3;
             fpv = this.formatPrice(fp);
         }
-        var totalttcfp = totalttc + (fpv * 1.2);
+        var totalttcfp = this.formatPrice(totalttc + (fp * 1.2));
 
         $.ajax({
             url: 'https://workshop.fluidbook.com/services/orderRemarkable',
             method: 'post',
-            data: {'items': items, 'fpv': fpv, 'details': this.fluidbook.cache.get('shipping-details')},
+            data: {
+                'items': items,
+                'fpv': fpv,
+                'totalttc': totalttcfp,
+                'details': this.fluidbook.cache.get('shipping-details')
+            },
             success: function (data) {
                 success(data);
             },
index dec0297ac7e77cd12a3574baf631ee272004fe15..aae0c5829273e21afceb3db50513103f54cb1b5d 100644 (file)
@@ -414,7 +414,7 @@ FluidbookNav.prototype = {
                 link = this.addLink(navType, 'nav-print', '#', 'print', 'print', 'print');
             } else if (icon == 'basket' && this.fluidbook.cart.enabled) {
                 link = this.addLink(navType, 'nav-basket', '#/cart', 'cart', 'basket', 'basket');
-                $(this.fluidbook).on('fluidbook.cart.updateIcon', {link: link.attr('id')}, function (e, data) {
+                $(this.fluidbook).on('fluidbook.cart.updateIcon', {link: $(link).attr('id')}, function (e, data) {
                     var n = data.number;
                     var l = $("#" + e.data.link);