Bagisto Forum

    Bagisto

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

    Search products by attribute options

    General Discussion
    2
    4
    395
    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.
    • G
      Gniewoj last edited by

      Where can I find method in Bagisto files which can provide get products by a attribute_options id. There is that method exists in some repository, or shloud I create it? Thank you

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by devansh-webkul

        Hi @Gniewoj,

        An inverse relationship has not been made, you need to create the method.

        I guess you are looking for this i.e.,

        packages/Webkul/Product/src/Repositories/ProductRepository.php ----> searchProductByAttribute()

        1 Reply Last reply Reply Quote 0
        • G
          Gniewoj last edited by

          Thank you @devansh-webkul
          In this function i can searching by assigned attribute, but I need search by specific attribute options id

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            Hi,

            Obviously attribute options are linked with attribute. Just fetch attribute id from attribute option and then the method will do their job.

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