From 965eae083ee5dfac76908bf7036558cdaac0a873 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 17 Apr 2024 13:57:48 +0200 Subject: [PATCH] wip #6869 @0.5 --- app/Fluidbook/Compiler/Cart.php | 20 +++++++++++++++---- app/Models/FluidbookExternalInstallServer.php | 4 +++- app/Models/Traits/PublicationSettings.php | 3 ++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/Fluidbook/Compiler/Cart.php b/app/Fluidbook/Compiler/Cart.php index 505dca27d..6f17ef928 100644 --- a/app/Fluidbook/Compiler/Cart.php +++ b/app/Fluidbook/Compiler/Cart.php @@ -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; } diff --git a/app/Models/FluidbookExternalInstallServer.php b/app/Models/FluidbookExternalInstallServer.php index 5d6599df3..d8b02ed38 100644 --- a/app/Models/FluidbookExternalInstallServer.php +++ b/app/Models/FluidbookExternalInstallServer.php @@ -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 = []; diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index 8461d50ac..82b474942 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -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', ]); -- 2.39.5