- @if(auth()->guard('customer')->check() && core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable'))
+ @if(auth()->guard('customer')->check() && $status)
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
@if ($product->type == 'configurable')
@@ -29,9 +35,7 @@
@endif
- @elseif(!auth()->guard('customer')->check() && core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable') && (core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction') == "hide-price-buy-cart-guest"))
-
-
+ @elseif(!auth()->guard('customer')->check() && $status && ($function == "hide-price-buy-cart-guest"))
@else
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
diff --git a/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/review-price.blade.php b/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/review-price.blade.php
index 99e01100c..717cf28c4 100644
--- a/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/review-price.blade.php
+++ b/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/review-price.blade.php
@@ -1,4 +1,10 @@
-@if( !(core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable')) )
+@php
+ $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
+
+ $function = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
+@endphp
+
+@if(! $status)
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
diff --git a/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/view/product-add.blade.php b/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/view/product-add.blade.php
index 311a1a73e..0521ef014 100644
--- a/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/view/product-add.blade.php
+++ b/packages/Webkul/ShowPriceAfterLogin/src/Resources/views/Shop/view/product-add.blade.php
@@ -5,18 +5,19 @@
@include ('shop::products.buy-now')
- @if(! auth()->guard('customer')->check() && core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable') && core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction') == "hide-price-buy-cart-guest")
+ @php
+ $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
+
+ $function = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
+ @endphp
+
+ @if(! auth()->guard('customer')->check() && $status && $function == "hide-price-buy-cart-guest")
- @elseif(
- !auth()->guard('customer')->check()
- && core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable')
- && (
- core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction') == "hide-buy-cart-guest")
- )
+ @elseif (! auth()->guard('customer')->check() && $status && ($function == "hide-buy-cart-guest"))