Bagisto Forum

    Bagisto

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

    Filter by special price

    General Discussion
    2
    3
    184
    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.
    • L
      LilD last edited by

      how could i filter by special price?
      I tried in productRepository to do this but it doesn't work

         $qb->where('variants.min_price', '>=', core()->convertToBasePrice($priceRange[0]));
                          $qb->where('variants.min_price', '<=', core()->convertToBasePrice(end($priceRange)));
                          $qb->orWhere('variants.special_price', '>=', core()->convertToBasePrice($priceRange[0]));
                          $qb->orWhere('variants.special_price', '<=', core()->convertToBasePrice(end($priceRange)));
      

      Can I do this:?

      I would like to filter and if the price is low, not just show me the old price

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

        Hi @LilD,

        Product flat table already contains special price column, you don't need to join this.

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

          @devansh-webkul yes but i put special_price and this not work

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