]> _ Git - cubeextranet.git/commitdiff
wip #4616 @0:10
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Sep 2021 15:31:08 +0000 (15:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Sep 2021 15:31:08 +0000 (15:31 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index bcc49d813cca6858c33195727c3ecff843975543..06eb4552988ddce64bc104bd624cdc4c35de89d8 100644 (file)
@@ -461,11 +461,17 @@ class wsHTML5Compiler
         $this->addJsLib('html2pdf', 'js/libs/html2pdf/html2pdf.min.js');
         $this->addJsLib('multiselect', 'js/libs/jquery/jquery.multi-select.js');
         $this->addJsLib('jqueryui', 'js/libs/jquery/jquery-ui.min.js');
+        $this->addJsLib('exceljs', 'js/libs/exceljs.min.js');
         $this->svgfiles[] = $this->assets . '/images/symbols/grandvision.svg';
 
         $cdir = $this->wdir . '/commerce/';
         $file = $cdir . $this->book->parametres->basketReferences;
-        $this->config->basketReferences = wsUtil::excelToArrayKeyVars($file, 'Excel2007', true);
+        $refs = wsUtil::excelToArrayKeyVars($file, 'Excel2007', true);
+        $this->config->basketReferences = [];
+        foreach ($refs as $ean => $ref) {
+            $this->config->basketReferences[$ean] = $ref;
+            $this->config->basketReferences[$ean]['angle_url'] = base64_encode(file_get_contents($this->wdir . '/commerce/opt/' . $ean . '-angle.jpg'));
+        }
 
         $odir = $cdir . '/opt/';
         if (!file_exists($odir)) {