]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6869 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 17 Apr 2024 11:57:48 +0000 (13:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Apr 2024 13:12:40 +0000 (15:12 +0200)
app/Fluidbook/Compiler/Cart.php
app/Models/FluidbookExternalInstallServer.php
app/Models/Traits/PublicationSettings.php

index 505dca27d5c403f6fb2b2916a1c4e3a6031ef019..6f17ef9284147fc5f42b482edad3a47fa7b46156 100644 (file)
@@ -564,6 +564,17 @@ trait Cart
         }
     }
 
+
+    /**
+     * @throws \Exception
+     */
+    public function writeBastideResahGuestCart()
+    {
+        $this->lessVariables['import-cart-styles'] = 'bastide-resah';
+        $this->addJsLib('bastide', 'js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js');
+    }
+
+
     /**
      * @throws \Exception
      */
@@ -571,7 +582,6 @@ trait Cart
     {
 
         $this->lessVariables['import-cart-styles'] = 'bastide-resah';
-
         $this->addJsLib('bastide', 'js/libs/fluidbook/cart/fluidbook.cart.bastide-resah.js');
 
 
@@ -603,11 +613,11 @@ trait Cart
                 $row = array_combine($column_headings, $row);
 
                 // The ARTICLE CODE is required, so if it doesn't exist, we can assume it's not a valid row
-                if (empty($row['ARTICLE CODE'])) {
+                if (empty($row['CIP'])) {
                     continue;
                 }
 
-                $references[$row['ARTICLE CODE']] = $row;
+                $references[$row['CIP']] = $row;
             }
 
         }
@@ -639,7 +649,6 @@ trait Cart
     }
 
 
-
     public function writeCartConfig()
     {
         if ($this->fluidbookSettings->cartLinkAppearance == 'overlay') {
@@ -692,6 +701,9 @@ trait Cart
                 case 'BastideResah':
                     $this->writeBastideResahCart();
                     break;
+                case 'BastideResahGuest':
+                    $this->writeBastideResahGuestCart();
+                    break;
                 default:
                     break;
             }
index 5d6599df359ea0d40eccb93858012622ccd1d726..d8b02ed380b184db486e8323f204dd3c130a77ac 100644 (file)
@@ -164,7 +164,9 @@ class FluidbookExternalInstallServer extends ExternalServer
 
         $server = new static();
         $server->setRawAttributes($data);
-        $check = $server->getTransferDriver()->checkConnexion($data);
+
+        $driver=$server->getTransferDriver();
+        $check = $driver->checkConnexion($data);
 
         $res = [];
 
index 8461d50ac5aa171055c71f73d5ab537e039b4c02..82b474942159b74cff251194065ba43f302a23f5 100644 (file)
@@ -1690,7 +1690,8 @@ trait PublicationSettings
                 'Thiriet' => 'Thiriet',
                 'CFOC' => 'CFOC',
                 'Bastide' => 'Bastide',
-                'BastideResah' => 'Bastide Resah'
+                'BastideResah' => 'Bastide Resah',
+                'BastideResahGuest' => 'Bastide Resah (invité)',
             ],
             'default' => 'com.fluidbook.player.basket.BasketManager',
         ]);