]> _ Git - cubeextranet.git/commitdiff
wip #4899 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 24 Nov 2021 17:38:20 +0000 (17:38 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 24 Nov 2021 17:38:20 +0000 (17:38 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index e093785d55df143361c119016f66fcabec864043..3beebec1fbe87623907b5ab513c0d4b2cf81adcf 100644 (file)
@@ -618,6 +618,25 @@ class wsHTML5Compiler
     public function writeJoueClub2021Cart()
     {
         $this->lessVariables['import-cart-styles'] = 'joueclub2021';
+        $extra = wsHTML5Link::parseExtras($this->book->parametres->cartExtraSettings, true);
+
+        /**
+         * buttonColor=#d7b646
+         * buttonTextColor=#ffffff
+         * headerBackgroundColor=#0e1a3c
+         * headerTextColor=#ffffff
+         */
+        $this->lessVariables['cart-button-color'] = $extra['buttoncolor'] ?? '#e30613';
+        $this->lessVariables['cart-button-text-color'] = $extra['buttontextcolor'] ?? '#ffffff';
+        $this->lessVariables['cart-button-radius'] = $extra['buttonradius'] ?? '50%';
+        $this->lessVariables['cart-header-background-color'] = $extra['headerbackgroundcolor'] ?? '#26348b';
+        $this->lessVariables['cart-header-text-color'] = $extra['headertextcolor'] ?? '#ffffff';
+        $this->lessVariables['cart-close-color'] = $extra['closecolor'] ?? '#ffffff';
+        $this->lessVariables['cart-close-background-color'] = $extra['closebackgroundcolor'] ?? '#e30613';
+        $this->lessVariables['cart-close-radius'] = $extra['closeradius'] ?? '50%';
+        $this->lessVariables['cart-actions-radius'] = $extra['actionsradius'] ?? '8px';
+        $this->lessVariables['cart-actions-background-color'] = $extra['actionsbackgroundcolor'] ?? '#26348b';
+        $this->lessVariables['cart-actions-text-color'] = $extra['actionstextcolor'] ?? '#ffffff';
 
         $this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
         $this->addJsLib('joueclub2021', 'js/libs/fluidbook/cart/fluidbook.cart.joueclub2021.js');
@@ -635,6 +654,14 @@ class wsHTML5Compiler
             }
             $this->vdir->copy($dest, 'data/commerce/' . $ref . '.jpg');
         }
+        $addFiles = [$this->config->cartHeaderImage, $this->config->cartHeaderMobileImage];
+        foreach ($addFiles as $f) {
+            if (!$f) {
+                return;
+            }
+
+            $this->vdir->copy($cdir . $f, 'data/commerce/' . $f);
+        }
 
         wsLinks::getLinksAndRulersFromFile($this->book_id, $links, $rulers);
     }