From 5b19fdba84a6e2d3fb1da03ddf4e23184396bd13 Mon Sep 17 00:00:00 2001 From: NiclasNorin <103985736+NiclasNorin@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:54:35 +0200 Subject: [PATCH] Feat: Project price container added (#314) * Feat: Project price container added * Feat: Moving prices to footer --- source/php/Component/Product/Product.php | 1 + source/php/Component/Product/components/button.blade.php | 7 +++---- source/php/Component/Product/components/price.blade.php | 2 ++ source/php/Component/Product/product.blade.php | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/php/Component/Product/Product.php b/source/php/Component/Product/Product.php index 2598b0ef..6d45f597 100644 --- a/source/php/Component/Product/Product.php +++ b/source/php/Component/Product/Product.php @@ -25,6 +25,7 @@ public function init() if (!isset($button['color'])) { $this->data['button']['color'] = $backgroundColor; } + $this->data['button']['classList'][] = 'c-product__button'; } } } diff --git a/source/php/Component/Product/components/button.blade.php b/source/php/Component/Product/components/button.blade.php index e3a7f00d..9205774a 100644 --- a/source/php/Component/Product/components/button.blade.php +++ b/source/php/Component/Product/components/button.blade.php @@ -1,4 +1,3 @@ - +@button($button) +@endbutton + diff --git a/source/php/Component/Product/components/price.blade.php b/source/php/Component/Product/components/price.blade.php index 33fc7a1a..bcdcf512 100644 --- a/source/php/Component/Product/components/price.blade.php +++ b/source/php/Component/Product/components/price.blade.php @@ -1,3 +1,4 @@ +
@foreach ($prices as $price)
@typography([ @@ -28,3 +29,4 @@ @endif
@endforeach +
diff --git a/source/php/Component/Product/product.blade.php b/source/php/Component/Product/product.blade.php index b77e5279..977d4fb4 100644 --- a/source/php/Component/Product/product.blade.php +++ b/source/php/Component/Product/product.blade.php @@ -17,7 +17,6 @@ ]) {{ $label }} @endtypography - @includeWhen($prices, 'Product.components.price')
@if ($meta) @@ -37,6 +36,9 @@ @endlisting @endif
- @includeWhen(!empty($button), 'Product.components.button') + @endcard