]> _ Git - fluidbook-html5.git/commitdiff
#7423
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 10 Apr 2025 10:29:34 +0000 (12:29 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 10 Apr 2025 10:29:34 +0000 (12:29 +0200)
js/libs/fluidbook/cart/fluidbook.cart.puma.js
js/libs/fluidbook/fluidbook.service.js

index 7c028bb3fee8cbf1e6a3cb34f3b4aabe83abfeee..293295b2cafe58fcdac98c4fea26b055a797a13b 100644 (file)
@@ -15,7 +15,7 @@ FluidbookCartPuma.prototype = {
         this.items = this.fluidbook.cache.get('cart', []);
         $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () {
             $this.chooseFileName(function () {
-                $this.exportPDF();
+                $this.exportPlanogramme();
             });
             return false;
         });
@@ -246,6 +246,11 @@ FluidbookCartPuma.prototype = {
     },
 
 
+    exportPlanogramme: function () {
+        let url = this.fluidbook.service.getBaseURL(true) + 'puma/planogramme/' + encodeURIComponent(this.getItemsReferences().join(','));
+        console.log(url);
+    },
+
     exportPDF: function () {
 
         var element = $('#pumacarttable').get(0);
index 8dfb0267860d9a6d3ed6726e85f226d59c38761c..12740dada11a60f41e91c8e4fd960e0cc36ecd95 100644 (file)
@@ -6,7 +6,7 @@ function FluidbookService(fluidbook, id) {
 FluidbookService.prototype = {
     getBaseURL: function (short) {
         var res = 'https://toolbox.fluidbook.com/';
-        if (short === 'true') {
+        if (short === 'true' || short === true) {
             res += 's';
         } else {
             res += 'services';