From 53da4a7a535a856e35deb70fa48f132afee12049 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 13 Jan 2026 14:09:07 +0100 Subject: [PATCH] wait #7938 @0.25 --- app/Fluidbook/Compiler/Cart.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/Fluidbook/Compiler/Cart.php b/app/Fluidbook/Compiler/Cart.php index 17230c9fa..f41a2e48b 100644 --- a/app/Fluidbook/Compiler/Cart.php +++ b/app/Fluidbook/Compiler/Cart.php @@ -892,6 +892,24 @@ trait Cart { $this->lessVariables['import-cart-styles'] = 'kimplay'; $this->addJsLib('kimplay', 'js/libs/fluidbook/cart/fluidbook.cart.kimplay.js'); - } + $refs = ExcelToArray::excelToArrayKeyVars($this->wdir . 'commerce/' . $this->config->basketReferences); + + $references = []; + foreach ($refs as $ref => $data) { + $references[$ref] = ['reference' => $ref, 'name' => $data['Désignation']]; + if ($data['Image']) { + $dest = $this->wdir . 'commerce/' . $ref . '.jpg'; + try { + if (!file_exists($dest) || filemtime($dest) < URL::mtime($data['Image'])) { + copy($data['Image'], $dest); + } + }catch (\Exception $e) { + + } + } + } + + $this->config->basketReferences = $references; + } } -- 2.39.5