@php $with = ['categories']; if (is_plugin_active('language-advanced') && Language::getCurrentLocaleCode() != Language::getDefaultLocaleCode()) { $with[] = 'categories.translations'; } $products->loadMissing($with); $customerType = auth('customer')->check() ? auth('customer')->user()->customer_type : 0; $classes = $customerType == 1 ? 'row-cols-xl-2 row-cols-lg-2' : 'row-cols-xl-4 row-cols-lg-3'; @endphp
@forelse ($products as $product)
{!! Theme::partial('ecommerce.product-item', compact('product')) !!}
@empty
@endforelse
{{-- @php $currentParams = request()->query(); unset($currentParams['page']); // Remove page parameter to avoid conflicts @endphp {!! $products->appends($currentParams)->links(Theme::getThemeNamespace('partials.pagination')) !!} --}} {!! $products->withQueryString()->links(Theme::getThemeNamespace('partials.pagination')) !!}