Bagisto Forum

    Bagisto

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

    Return back to page 1 when limit is more than

    General Discussion
    2
    7
    833
    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

      Hi, there is a bug on the product page. When I have, for example, a higher limit than it can enter on the page, it doesn't show me, all that goes on page 1, but it leaves me on page 3, for example.
      For example
      I am on page 3 and I want to display 56 products, they no longer appear.
      I'm on page 1 and I want to act on 56 products, they appear.
      I think the problem is from ProductRepository but I don't know what I could change exactly here

      
              $results = new LengthAwarePaginator($items, $count, $perPage, $page, [
                  'path'  => request()->url(),
                  'query' => request()->query(),
              ]);
      
              return $results;
      
      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @LilD,

        Can you share the request URL and page screenshot?

        1 Reply Last reply Reply Quote 0
        • L
          LilD last edited by

          3416b734-9032-442c-ad73-fb5ad51ec425-image.png
          bf02401f-74bd-4912-869b-0f552d217430-image.png
          On products page when I try to make limit to 56 on page 5

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

            Hi @LilD,

            How many products do you have?

            1 Reply Last reply Reply Quote 0
            • L
              LilD last edited by

              @devansh-webkul 150 i think

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

                Then how it will come at page number 5 when all data with limit 56 ends at page number 3 or 2.

                1 Reply Last reply Reply Quote 0
                • L
                  LilD last edited by LilD

                  @devansh-webkul said in Return back to page 1 when limit is more than:

                  Then how it will come at page number 5 when all data with limit 56 ends at page number 3 or 2.

                  He will stay on page 5 ... can you give me some advice on how I can make a query return to page 3 when the products are like this?
                  Apparently if I have products over the limit and they stop on a page 2/3/4 the next page has no products to display, how could I go back?
                  @devansh-webkul

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