Answer the question
In order to leave comments, you need to log in
Opencart - How to display product options on category pages?
Hello!
I'm trying to display product options on the category pages for each product, so that you can view the options right on the product page (in the future, maybe immediately select and then add to the cart).
Currently opened the Controller tabs product.php and category.php .
In the first tab I found the definition of the array of options - this->data['options'] = array();
I copied it to category.php .
Then I try to call the options in product/category.tpl , starting with <?php if ($options) { ?>
, but that's where the condition ends. The listing loop <?php foreach ($products as $product) { ?>
does not see the options in the current product and simply does not display the options block.
What could be the problem?
What pitfalls have I missed?
Please tell me.
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question