• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

Product filter by date "Newest First" does not work

Bug Report
2
6
429
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.
  • K
    kukocrunch last edited by 19 Nov 2020, 21:02

    There's an issue with specific category filter
    "Newest First" does not work

    Here are steps to follow:

    • Shop by category
    • Click Sort By
    • Choose Newest First
    • Choose Oldest First

    You can notice that products results are not filtered by date and follows default query

    I tried to enable debug this is the query for Oldest first :
    select distinct `product_flat`.* from `product_flat` inner join `product_flat` as `variants` on `product_flat`.`id` = COALESCE(variants.parent_id, variants.id) left join `product_categories` on `product_categories`.`product_id` = `product_flat`.`product_id` left join `product_attribute_values` on `product_attribute_values`.`product_id` = `variants`.`product_id` where `product_flat`.`channel` = 'default' and `product_flat`.`locale` = 'en' and `product_flat`.`url_key` is not null and `product_categories`.`category_id` = '7' and `product_flat`.`status` = 1 and `product_flat`.`visible_individually` = 1 group by `product_flat`.`id` limit 9 offset 0

    This is the query for Newest first :
    select distinct `product_flat`.* from `product_flat` inner join `product_flat` as `variants` on `product_flat`.`id` = COALESCE(variants.parent_id, variants.id) left join `product_categories` on `product_categories`.`product_id` = `product_flat`.`product_id` left join `product_attribute_values` on `product_attribute_values`.`product_id` = `variants`.`product_id` where `product_flat`.`channel` = 'default' and `product_flat`.`locale` = 'en' and `product_flat`.`url_key` is not null and `product_categories`.`category_id` = '7' and `product_flat`.`status` = 1 and `product_flat`.`visible_individually` = 1 group by `product_flat`.`id` limit 9 offset 0

    the query are the same, and does not add order by created_at

    1 Reply Last reply Reply Quote 0
    • V
      Vaishali Agarwal last edited by Vaishali Agarwal 20 Nov 2020, 13:58 20 Nov 2020, 13:58

      @kukocrunch
      may I know your bagisto version on which you are getting this issue?

      K 1 Reply Last reply 24 Nov 2020, 06:34 Reply Quote 0
      • K
        kukocrunch last edited by 23 Nov 2020, 02:43

        @Vaishali-Agarwal hello! my bagisto version : v1.2.0

        1 Reply Last reply Reply Quote 0
        • K
          kukocrunch @Vaishali Agarwal last edited by kukocrunch 24 Nov 2020, 06:37 24 Nov 2020, 06:34

          @Vaishali-Agarwal

          The version I use is 1.2.0
          f7678dbd-ff82-45a2-bfe4-26f3da3d36b3-image.png
          I tried also using bagisto demo page
          Sort By Newest First doesn't work.

          1 Reply Last reply Reply Quote 0
          • V
            Vaishali Agarwal last edited by 24 Nov 2020, 14:55

            @kukocrunch
            Thanks for the update!
            We will fix this and update you here soon with the commit id.

            Thanks

            1 Reply Last reply Reply Quote 1
            • V
              Vaishali Agarwal last edited by Vaishali Agarwal 26 Nov 2020, 12:50 26 Nov 2020, 12:50

              @kukocrunch
              the bug is resolved now, you may check this https://github.com/bagisto/bagisto/issues/4299

              Kindly update your project with this commit ID

              1 Reply Last reply Reply Quote 1
              5 out of 6
              • First post
                5/6
                Last post