]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7752 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 22 Sep 2025 15:56:44 +0000 (17:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 22 Sep 2025 15:56:44 +0000 (17:56 +0200)
app/Fluidbook/Compiler/Cart.php
app/Fluidbook/Compiler/Compiler.php
app/Fluidbook/Compiler/Links.php
app/Models/Traits/PublicationSettings.php

index 9b556028580e269ab4f18b94e52619f5091e39f0..7ba5f64dec6081a73d94685a3847853040011c3e 100644 (file)
@@ -766,6 +766,9 @@ trait Cart
                 case 'JoueclubWishlist2024':
                     $this->writeJoueClub2024Cart();
                     return;
+                case 'JoueclubNoWishlist2025':
+                    $this->writeJoueClubNoWishlist2025Cart();
+                    return;
                 case 'Remarkable':
                     $this->addParsley();
                     $this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
@@ -861,4 +864,21 @@ trait Cart
         return $references;
     }
 
+    public function writeJoueClubNoWishlist2025Cart()
+    {
+        $ref = ExcelToArray::excelToArrayKeyVars($this->wdir . 'commerce/' . $this->config->basketReferences);
+        $this->getLinksAndRulers($links, $rulers);
+        foreach ($links as $k => $link) {
+            if ($link['type'] == Link::CART) {
+                $link['image'] = 'icone-plus.svg';
+                $link['type'] = Link::WEB;
+                $link['tooltip'] = 'Plus d\'informations';
+                $link['target'] = '_popupiframe';
+                $link['to'] = $ref[$link['to']]['Url produit'] ?? '';
+                $links[$k] = $link;
+            }
+        }
+        $this->setLinksAndRuliers($links, $rulers);
+    }
+
 }
index de45244ae3408abaf23e227a5d11bdb066e2ec57..f6f185e90f31800a5e3df566201c9abcbbdf1ae0 100644 (file)
@@ -266,6 +266,8 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
     protected $_addedPDFJS = false;
     protected $audioDescriptionTextsList = [];
     protected $hybrid = false;
+    protected $_links;
+    protected $_rulers;
 
     protected $_docDimensions = [];
 
index 7ba1315d369795dc5aad0e8765a63ab0bce5396d..466f2c69bd5907597a306fe3c617c12ec0a480af 100644 (file)
@@ -16,7 +16,18 @@ trait Links
 {
     public function getLinksAndRulers(&$links, &$rulers)
     {
-        return $this->getFluidbook()->getLinksAndRulers($links, $rulers, 'latest', true);
+        if ($this->_links !== null) {
+            $links = $this->_links;
+            $rulers = $this->_rulers;
+            return;
+        }
+        $this->getFluidbook()->getLinksAndRulers($links, $rulers, 'latest', true);
+    }
+
+    public function setLinksAndRuliers($links, $rulers)
+    {
+        $this->_links = $links;
+        $this->_rulers = $rulers;
     }
 
     /**
@@ -25,7 +36,6 @@ trait Links
      */
     protected function writeLinks()
     {
-
         $dupLinkAreaColor = ($this->getSetting('linksAnimationLayer', 'top') === 'under');
         if ($dupLinkAreaColor) {
             $dupLinkAreaColor = $this->getSetting('linksColor');
index fad22c3ad9245eb799ed87cbbd4df0fb8d6b42be..0fee67e249bb3379685b531038488c2e9aafdd7b 100644 (file)
@@ -1448,6 +1448,7 @@ trait PublicationSettings
                 'GrandPavois' => 'Grand Pavois',
                 'JoueclubWishlist2021' => 'Wishlist Jouéclub Noël 2021',
                 'JoueclubWishlist2024' => 'Wishlist Jouéclub Noël 2024',
+                'JoueclubNoWishlist2025' => 'Jouéclub sans wishlist 2025',
                 'Thiriet' => 'Thiriet',
                 'CFOC' => 'CFOC',
                 'Bastide' => 'Bastide',