Y
Y
Yaroslav2018-09-04 13:13:09
opencart
Yaroslav, 2018-09-04 13:13:09

Opencart 2.3 How to display all products on the main page without modules?

I need to display all products on the main page, but without third-party modules (any Latest, All products, etc.).
Just paste what you need into home.tpl, well, into the controller and model.
The problem is that I'm copying everything from the categories, it should work, but it doesn't work..
Maybe someone did something similar? Are there any pitfalls?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2018-09-04
@Yaxoo

The problem is that I'm copying everything from the categories, it should work, but it doesn't..

no need to copy anything, why extra junk
1. Load the product model
2. make a request to the desired method - you get the products
3. send to $data['all_products'] in the template
4. in the template output through the loop as you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question