Number of new & featured products in bagisto
-
I have uploaded many products in my bagisto store but in front end,it shows only four products in featured products and four in as new products
How can i display all featured products and all new products instead of only four products
-
Hi mtande,
-
You need to override the (Webkul\Product\Repositories\ProductRepository) in your package and pass an parameters to getNewProducts and getFeaturedProducts methods in your package repository.
-
And, to get dynamic parameters, you need to create configuration in admin panel for 'Number of products you want to display at shop from configuration to get no of product you want to display at shop.
-
Also, you need to override the featured-products and new-products blade file in (Shop/resources/view/home) and perform an check as below code
@php $count = 4; $config = core()->getConfigData('acme.configuration.general.featured_product'); if ($config > 4) $count = $config; $featuredProducts = app('Webkul\Acme\Repositories\Product\ProductRepository')->getFeaturedProducts($count); $featuredProductsCount = $featuredProducts->count(); @endphp
Thanks
-