Bagisto Forum

    Bagisto

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

    How can i change the layered navigation for each category?

    Knowledge Base
    4
    4
    1104
    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.
    • S
      sanjana singh last edited by

      How can I change the layered navigation for each category?

      1 Reply Last reply Reply Quote 0
      • B
        bagisto-mogul Banned last edited by

        Hi,
        To do such you must look into this blade file in

        **shop/resources/product/list/layered-navigation.blade.php**.
        

        In this blade file you can place down the conditions for your
        attributes belonging to respective category loaded, which is
        identifiable by slug.

        And you must find the products belonging to that category and
        attributes of those product that have used in layered navigation
        property.

        1 Reply Last reply Reply Quote 0
        • A
          Arpad last edited by

          Hi!

          In

          shop/resources/product/list/layered-navigation.blade.php
          

          all the attributes are fetched, regardless of a category...

          data: () => ({
          attributes: @json($attributeRepository->getFilterAttributes()),
          appliedFilters: {}
          }),

          The getFilterAttribues could accept a category slug, and if there is an attribute_family with that slug, their attributes could be returned.

          BTW I would like to show only those attributes for filtering which the products have in the current category.

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

            Hi,

            To achieve your requirements, you need write your own code in this method & it could be done like.

            1. pass category in getFilterAttribues function.
            2. get product belongs to that category.
            3. retrieve attributes of those product.

            Thanks
            Rahul Shukla

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