How to add hot category?
-
Is there a way to add this on my home page of my store.?
-
@tluanga
You can easily add the hot category from the admin backend.
Just go this route velocity->meta data->Home Page Content and add the below line of code @include('shop::home.hot-categories', ['category' => ['category_slug1', 'category_slug2', 'category_Slug3', 'category_slug4']]) -
@Vaishali-Agarwal thank you so much...
-
@Vaishali-Agarwal Is there away to return this categories through the api?
-
Hi @AN-Varit, you can only get these categories,
https://devdocs.bagisto.com/1.x/api/categories.html -
@devansh-webkul If I want to add
is_hot
attribute to category and filter by it in api area.
What is the best approach to do that? -
Hi @AN-Varit,
-
No need to do any code. Just go to Catalog > Attribute in the admin panel.
-
And create an attribute with the name
is_hot
and type boolean and add all the necessary settings like the table inproduct_flat
and inlayered_navigation
. -
Now assigned that attribute to attribute family.
-
Then check, if still not coming then you can slightly add one check for
is_hot
because rest of the things is already done for you.
-
-
@devansh-webkul Thanks for replying, but I want to filter category itself not its products
-
Then, in this case, you need to customize this as per your need.