From 2bb4893e5bac90477e5c29fbcd45ad94d0a3efb5 Mon Sep 17 00:00:00 2001 From: Bob Wezelman Date: Wed, 22 May 2024 13:41:23 +0200 Subject: [PATCH] Display right prices (#19) --- resources/js/components/amastybundles.vue | 2 +- resources/views/components/productbundle-item.blade.php | 7 +++++-- resources/views/components/productbundles.blade.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/js/components/amastybundles.vue b/resources/js/components/amastybundles.vue index 5d323d8..c7010c5 100644 --- a/resources/js/components/amastybundles.vue +++ b/resources/js/components/amastybundles.vue @@ -126,7 +126,7 @@ }, itemPrice(index) { - if (!index) { + if (!this.bundle.items[index]) { return } diff --git a/resources/views/components/productbundle-item.blade.php b/resources/views/components/productbundle-item.blade.php index b89d68d..1232235 100644 --- a/resources/views/components/productbundle-item.blade.php +++ b/resources/views/components/productbundle-item.blade.php @@ -17,8 +17,11 @@ {{ $image }}
{{ $name }}
-
@{{ itemPrice(index) }}
- + @if($firstProduct) +
@{{ mainProductPrice | price }}
+ @else +
@{{ itemPrice(index) | price }}
+ @endif {{ $slot }} diff --git a/resources/views/components/productbundles.blade.php b/resources/views/components/productbundles.blade.php index 4beb9ef..a3f8ab1 100644 --- a/resources/views/components/productbundles.blade.php +++ b/resources/views/components/productbundles.blade.php @@ -4,7 +4,7 @@
-
+
@{{ bundle.block_title }}