]> _ Git - fluidbook-html5.git/commitdiff
wip #4089 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Nov 2020 14:03:45 +0000 (15:03 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Nov 2020 14:03:45 +0000 (15:03 +0100)
js/libs/fluidbook/cart/fluidbook.cart.mopec.js

index 0cb6c6aeae311f2eeef427ac5bc93099eef78424..eddbc5a35ea1d1532cee7ad98345184e1160781e 100644 (file)
@@ -218,8 +218,8 @@ FluidbookCartMopec.prototype = {
         $.ajax({
             url: this.baseURL + 'fastorder/index/search',
             cache: false,
-            data: {product: sku, sort_order: 0},
-            method: 'post',
+            data: {q: sku},
+            method: 'get',
             xhrFields: {withCredentials: true},
             dataType: 'json',
             success: function (data) {
@@ -228,10 +228,10 @@ FluidbookCartMopec.prototype = {
                     product_id = null;
                 } else {
                     $.each(data, function (k, e) {
-                        if (e.product_sku !== sku) {
+                        if (e.sku !== sku) {
                             return true;
                         }
-                        product_id = e.product_id;
+                        product_id = e.entity_id;
                         var min = 1;
                         if (e.min !== undefined) {
                             min = e.min;