From: Vincent Vanwaelscappel Date: Thu, 10 Apr 2025 10:29:34 +0000 (+0200) Subject: #7423 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=22c224fa2b36d7ddf06a3c71b6fa2d5ebeee3b9e;p=fluidbook-html5.git #7423 --- diff --git a/js/libs/fluidbook/cart/fluidbook.cart.puma.js b/js/libs/fluidbook/cart/fluidbook.cart.puma.js index 7c028bb3..293295b2 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.puma.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.puma.js @@ -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); diff --git a/js/libs/fluidbook/fluidbook.service.js b/js/libs/fluidbook/fluidbook.service.js index 8dfb0267..12740dad 100644 --- a/js/libs/fluidbook/fluidbook.service.js +++ b/js/libs/fluidbook/fluidbook.service.js @@ -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';