Author Topic: display all products  (Read 772 times)

chakomako

  • Beginner
  • *
  • Posts: 13
display all products
« on: March 15, 2010, 13:12:28 pm »
hi there,

after going to sub category, i want to show all products instead of selecting 20,30 or 50, i dont want that, i just want to display all products in that particular category and dont want display # too, i managed to remove that but it still restricts to 20 products per page

how to do this please help.

chako

chakomako

  • Beginner
  • *
  • Posts: 13
Re: display all products
« Reply #1 on: March 15, 2010, 16:25:52 pm »
someone pls help, am on deadline, experts pls help me, pls let me know what to modify ? i tried modifying shop.browse.php but its not working, i tried everything

pls help plss
thanks in advance.

chakomako

  • Beginner
  • *
  • Posts: 13
Re: display all products
« Reply #2 on: March 16, 2010, 12:13:30 pm »
someone pls help me, am in the middle of deadline please someone help.

joneustace

  • Jr. Member
  • **
  • Posts: 71
Re: display all products
« Reply #3 on: April 19, 2010, 19:18:00 pm »
I would also like to know the answer to this

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: display all products
« Reply #4 on: April 19, 2010, 20:34:27 pm »
If you're looking at shop.browse.php and before the line that starts with

if ( $limitstart > 0 && $limit >= $num_rows )...

You can just output $list - "echo $list;" which shows the SQL command that's being executed.

You'll notice that there's the query string end with "LIMIT 0, 50" if you've selected a page size of 50.

If you want to see all items in a category, you'll want to remove this LIMIT instruction in the SQL, so you can do a string replace after the if statement. Ugly I know, but it'll work and a fix I came up with in a few minutes.

        $list = str_replace( 'LIMIT 0, 5', '', $list );
        $list = str_replace( 'LIMIT 0, 10', '', $list );
        $list = str_replace( 'LIMIT 0, 15', '', $list );
        $list = str_replace( 'LIMIT 0, 20', '', $list );
        $list = str_replace( 'LIMIT 0, 25', '', $list );
        $list = str_replace( 'LIMIT 0, 30', '', $list );
        $list = str_replace( 'LIMIT 0, 50', '', $list );

Hope this help,
--Rich