From ef7d718d1f771ede1d73de5a7570a409c1714701 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Tue, 14 Apr 2020 11:05:25 +0530 Subject: [PATCH] subcategory issue resolved --- .../Velocity/src/Http/Controllers/Shop/ShopController.php | 5 +++-- .../Velocity/src/Resources/views/shop/UI/header.blade.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php index 194935f4d..f3b709d79 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php @@ -235,16 +235,17 @@ class ShopController extends Controller public function getCategoryProducts($categoryId) { $products = $this->productRepository->getAll($categoryId); + $productItems = $products->items(); + $productsArray = $products->toArray(); if ($productItems) { - $formattedProducts =[]; + $formattedProducts = []; foreach ($productItems as $product) { array_push($formattedProducts, $this->velocityHelper->formatProduct($product)); } - $productsArray = $products->toArray(); $productsArray['data'] = $formattedProducts; } diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php index 395c3129f..65d9b7df4 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php @@ -196,7 +196,7 @@ + :href="`${$root.baseUrl}/${subCategory.slug}/${nestedSubCategory.slug}`">