From 13fdf5102506af3a556a4d5a021fe59656b2215c Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 14 Jan 2026 19:20:00 +0100 Subject: [PATCH] wip #7898 @4:00 --- .../fluidbook/cart/fluidbook.cart.kimplay.js | 63 +++++++++++---- style/cart/kimplay.less | 76 +++++++++++++++---- 2 files changed, 111 insertions(+), 28 deletions(-) diff --git a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js index 6b998f70..648d4998 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js @@ -11,8 +11,8 @@ FluidbookCartKimplay.prototype = { init: function () { var $this = this; this.items = this.fluidbook.cache.get('cart', {}); - $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () { - $this.exportPDF(); + $(document).on(this.fluidbook.input.clickEvent, '.sendRequest', function () { + $this.sendRequet(); return false; }); @@ -131,32 +131,43 @@ FluidbookCartKimplay.prototype = { var $this = this; var content = ''; content += ''; - content += ''; content += ''; - content += ''; - content += ''; - content += ''; - content += ''; + content += ''; + content += ''; + content += ''; + content += ''; + content += ''; content += ''; content += ''; content += ''; - $.each(this.getItems(), function (i, ref) { - var item = $this.data[ref]; + $.each(this.getItems(), function (i) { + var item = $this.items[i]; if (item === undefined) { return; } + + var dataByRef = $this.data[i] + content += ''; - content += ''; - content += ''; - content += ''; - content += ''; + if (dataByRef.image) { + content += ''; + }else { + content += '' + } + content += ''; + content += ''; + content += ''; + content += ''; content += ''; content += ''; }); content += ''; content += '
' + this.fluidbook.l10n.__('product name') + '' + this.fluidbook.l10n.__('product code') + '' + this.fluidbook.l10n.__('product range') + '' + this.fluidbook.l10n.__('category') + '' + this.fluidbook.l10n.__('ref') + '' + this.fluidbook.l10n.__('designation') + '' + this.fluidbook.l10n.__('quantité') + '' + this.fluidbook.l10n.__('commentaire') + '
' + item.Denomination + '' + ref + '' + item.Gamme + '' + item.Categorie + '' + i + '' + dataByRef.name + '' + item.quantity + '' + item.comment + '' + getSpriteIcon('interface-close') + '
'; content += ''; return content; @@ -199,4 +210,28 @@ FluidbookCartKimplay.prototype = { s = s.replace(/\s/g, ''); return parseInt(s); }, + + sendCart: function() { + let view = `
+ ${this.fluidbook.menu.getCaption("", 'small')} +
+
+
+

${this.data[ref].name}

+
(réf. ${ref})
+
+ Quantité souhaitée :
+
+ Commentaire (facultatif) +
+ +
+
+
`; + this.fluidbook.menu.openCustomView(view, 'cart-kimplay-sendcart'); + }, + + sendRequest: function() { + // + } }; \ No newline at end of file diff --git a/style/cart/kimplay.less b/style/cart/kimplay.less index 3a176b1c..09c81412 100644 --- a/style/cart/kimplay.less +++ b/style/cart/kimplay.less @@ -2,11 +2,10 @@ background-color: rgba(0, 255, 0, 0.5); } -.mview[data-menu="cart-kimplay-qty"] { +.mview[data-menu="cart-kimplay-qty"], +#kimplaycart { background-color: #fff; color: #000; - width: 605px; - height: 364px; .caption { height: 30px; @@ -17,12 +16,29 @@ background-color: #fff; } + button { + border: 0; + background-color: #ad1057; + color: #fff; + text-transform: uppercase; + text-align: center; + padding: 14px 0; + display: block; + width: 100%; + font-weight: bold; + cursor: pointer; + } +} + +.mview[data-menu="cart-kimplay-qty"] { + width: 605px; + height: 364px; + .image { display: inline-block; vertical-align: middle; width: 245px; - img { max-width: 250px; max-height: 300px; @@ -64,20 +80,52 @@ background-color: #fff; text-align: center; } + } +} + +#kimplaycart { + padding: 0 30px; - button { - border: 0; - background-color: #ad1057; - color: #fff; - text-transform: uppercase; + th { + text-transform: uppercase; + padding: 20px 0; + background-color: #ad1057; + color: #fff; + text-align: left; + font-weight: 600; + + &.quantite { text-align: center; - padding: 14px 0; - display: block; - width: 100%; - font-weight: bold; - cursor: pointer; } } + + table td { + padding-left: 0; + padding-right: 0; + + &.quantite { + text-align: center; + } + } + + img { + width: 100%; + max-width: 60px; + } + + .completeSelection { + border: 2px solid #ad1057; + background-color: #fff + } + + .sendRequest { + display: inline-block; + width: auto; + padding: 16px 25px; + height: 45px; + margin-left: 10px; + vertical-align: top; + } } div.link[data-action="basket"] { -- 2.39.5