Merge pull request #2882 from shubhwebkul/master
subcategory issue resolved
This commit is contained in:
commit
7c7b99c901
|
|
@ -235,16 +235,17 @@ class ShopController extends Controller
|
||||||
public function getCategoryProducts($categoryId)
|
public function getCategoryProducts($categoryId)
|
||||||
{
|
{
|
||||||
$products = $this->productRepository->getAll($categoryId);
|
$products = $this->productRepository->getAll($categoryId);
|
||||||
|
|
||||||
$productItems = $products->items();
|
$productItems = $products->items();
|
||||||
|
$productsArray = $products->toArray();
|
||||||
|
|
||||||
if ($productItems) {
|
if ($productItems) {
|
||||||
$formattedProducts =[];
|
$formattedProducts = [];
|
||||||
|
|
||||||
foreach ($productItems as $product) {
|
foreach ($productItems as $product) {
|
||||||
array_push($formattedProducts, $this->velocityHelper->formatProduct($product));
|
array_push($formattedProducts, $this->velocityHelper->formatProduct($product));
|
||||||
}
|
}
|
||||||
|
|
||||||
$productsArray = $products->toArray();
|
|
||||||
$productsArray['data'] = $formattedProducts;
|
$productsArray['data'] = $formattedProducts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@
|
||||||
|
|
||||||
<a
|
<a
|
||||||
class="unset"
|
class="unset"
|
||||||
:href="`${$root.baseUrl}/${nestedSubCategory.slug}`">
|
:href="`${$root.baseUrl}/${subCategory.slug}/${nestedSubCategory.slug}`">
|
||||||
|
|
||||||
<div class="category-logo">
|
<div class="category-logo">
|
||||||
<img
|
<img
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue