V
V
Valery Vitalievich2021-03-08 14:53:08
opencart
Valery Vitalievich, 2021-03-08 14:53:08

How to display attributes in categories and modules in opencart 3?

Good day.
Tell me how to display attributes in categories and other pages (modules, search, etc.) in opencart 3.
I would be very grateful for your help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alpha12, 2021-03-13
@Alpha12

in the cycle of receiving goods, for example, the file catalog/controller/product/category.php,
look for the line
$data['products']
and write
'attributes_groups' => $this->model_catalog_product->getProductAttributes($result['product_id') into the array ]),
after, display in the template

V
VVCh, 2021-03-09
@VVCh

see how they are taken in the product
Transfer to $data['ptoducts']
display in the template
Increase load by limit*(2*number of groups) requests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question