How can I limit the attribute values in shop page? To show only 10/15 attribute values at once instead of showing all at once.
-
There are too many brands. How can i paginate or add limit in that brand attribute?
#Urgent
#Thanks in advance -
Hi @bjsharma
can you please provide your website url.Thanks.
-
@Vaishali-Agarwal Sorry, it has not been made live. May be today we will make it live.
-
@Vaishali-Agarwal, here is the url http://mdfslaravel.ebt-me.com/luggage
-
You can add logic to set limit in order to render the brands.
this.attribute = this.attributes.map(attribute => {
if (attribute.code == 'brand') {
attribute.options = attribute.options.splice(0, add_limit_here);
}
return attribute;
});Let me know if you have any further query.
Thanks! -
Related to this, currently the "brand" show all items on each category..
How to show only available brand on the selected category ?Let say i have category A that have only 2 items, but the attribute filter show all brand instead of only available brand for those 2 items..
-
We also have the same requirements. In Bagisto demo also we see a brand filters for a category and when we select it says no product found.
Filters should only show as per the category selected and not all. Any help or guidance will be helpful.
-
@otheriz @robinflyhigh
your requirement has been implemented in the master branch, please check this https://github.com/bagisto/bagisto/issues/3950you may update your code with this PR https://github.com/bagisto/bagisto/commit/76f2ec6c8aa2727323f8d62f0cfc4270ce5bc815