From 33c37ea6dd6bb493a7dedfb61200eb30bb10ae2e Mon Sep 17 00:00:00 2001 From: rintisch Date: Wed, 19 Jun 2024 07:18:20 +0200 Subject: [PATCH] [TASK] Improve naming and adapt parameter structure --- Classes/Domain/Model/Cart/Product.php | 15 +++++++------- .../Cart/ProductForm/ProductList.html | 20 +++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Classes/Domain/Model/Cart/Product.php b/Classes/Domain/Model/Cart/Product.php index fae6b15f..8d6ff19b 100644 --- a/Classes/Domain/Model/Cart/Product.php +++ b/Classes/Domain/Model/Cart/Product.php @@ -60,6 +60,8 @@ class Product */ protected bool $handleStockInVariants = false; + protected array $detailPageParameter = []; + public function __construct( protected string $productType, protected int $productId, @@ -69,7 +71,6 @@ public function __construct( protected TaxClass $taxClass, protected int $quantity, protected bool $isNetPrice = false, - protected array $detailViewParameter = [], FeVariant $feVariant = null ) { if ($feVariant) { @@ -699,18 +700,18 @@ public function setHandleStockInVariants(bool $handleStockInVariants): void $this->handleStockInVariants = $handleStockInVariants; } - public function getDetailViewParameter(): array + public function getDetailPageParameter(): array { - return $this->detailViewParameter; + return $this->detailPageParameter; } - public function setDetailViewParameter(array $detailViewParameter): void + public function setDetailPageParameter(array $detailPageParameter): void { - $this->detailViewParameter = $detailViewParameter; + $this->detailPageParameter = $detailPageParameter; } - public function addDetailViewParameter(string $key, int|string $value): void + public function addDetailPageParameter(string $key, int|string $value): void { - $this->detailViewParameter[$key] = $value; + $this->detailPageParameter[$key] = $value; } } diff --git a/Resources/Private/Partials/Cart/ProductForm/ProductList.html b/Resources/Private/Partials/Cart/ProductForm/ProductList.html index b53dca66..a40ae0f6 100644 --- a/Resources/Private/Partials/Cart/ProductForm/ProductList.html +++ b/Resources/Private/Partials/Cart/ProductForm/ProductList.html @@ -6,13 +6,13 @@
- + {product.title} {f:if(condition:'{product.feVariant.value}',then:'- {product.feVariant.value}')} @@ -74,13 +74,13 @@  
- + {variant.title}