Search code examples
phpmoduleopencartopencart2.xopencart-module

How to display all products in a single page in opencart?


I want to display all products in onepage while clicking a single button in main menu and also need to display category in main menu...

thank in advance...!


Solution

    1. Display Alll Product in one Page

      You have to create separate page for displaying all products.

      1. Create Model file catalog\model\catalog\allproduct.php and paste code this http://pastebin.com/suF5TP3z
      2. Create Controller file catalog\controller\productallproduct.php and paste below code http://pastebin.com/jZq3hZyc
      3. Create View file catalog\view\theme\default\template\productallproduct.tpl and paste below code http://pastebin.com/1HNh3x73

        4 . Create Language file catalog\language\en-gb\product\allproduct.php and paste below code http://pastebin.com/EcyJH7F9
        1. Enable module from back-end You can see link in menu
          enter image description here
    2. Display All Category in Menu
      1. Open and edit your category:
      2. Select tab Data:
      3. Find and Check:Top: Display in the top menu bar.
        enter image description here
        Note : Only works for the top parent categories.You will need to check all the top level categories.It's Opencart bugs.