From: Vincent Vanwaelscappel Date: Tue, 13 Jan 2026 13:09:07 +0000 (+0100) Subject: wait #7938 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=53da4a7a535a856e35deb70fa48f132afee12049;p=fluidbook-toolbox.git wait #7938 @0.25 --- 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; + } }