Merge pull request #2882 from shubhwebkul/master

subcategory issue resolved
This commit is contained in:
Jitendra Singh 2020-04-14 12:08:28 +05:30 committed by GitHub
commit 7c7b99c901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -196,7 +196,7 @@
<a
class="unset"
:href="`${$root.baseUrl}/${nestedSubCategory.slug}`">
:href="`${$root.baseUrl}/${subCategory.slug}/${nestedSubCategory.slug}`">
<div class="category-logo">
<img