Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    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.

    General Discussion
    5
    8
    735
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bjsharma last edited by

      Screenshot (412).png
      There are too many brands. How can i paginate or add limit in that brand attribute?
      #Urgent
      #Thanks in advance

      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by

        Hi @bjsharma
        can you please provide your website url.

        Thanks.

        B 2 Replies Last reply Reply Quote 0
        • B
          bjsharma @Vaishali Agarwal last edited by

          @Vaishali-Agarwal Sorry, it has not been made live. May be today we will make it live.

          1 Reply Last reply Reply Quote 0
          • B
            bjsharma @Vaishali Agarwal last edited by

            @Vaishali-Agarwal, here is the url http://mdfslaravel.ebt-me.com/luggage

            1 Reply Last reply Reply Quote 0
            • shubhwebkul
              shubhwebkul last edited by shubhwebkul

              You can add logic to set limit in order to render the brands.

              https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php#L132

              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!

              1 Reply Last reply Reply Quote 0
              • O
                otheriz last edited by

                @shubhwebkul ,

                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..

                1 Reply Last reply Reply Quote 0
                • R
                  robinflyhigh last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • V
                    Vaishali Agarwal last edited by

                    @otheriz @robinflyhigh
                    your requirement has been implemented in the master branch, please check this https://github.com/bagisto/bagisto/issues/3950

                    you may update your code with this PR https://github.com/bagisto/bagisto/commit/76f2ec6c8aa2727323f8d62f0cfc4270ce5bc815

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post