Post by CharlesWilliams » Thu May 19, 2022 2:33 pm

I switched over to Opencart 3.0.. Not to fond of the .tpl to .twig changes.

Anyways, I have been trying, to no avail, to display all products from a particular category on another category page.

I found this foreach loop:

{% for product in products %}

Which I imagine reads

<?php foreach ($products as $product) { //do something } ?>

I tried adding the Loop to the path:

catalog/view/theme/*/template/product/category.twig

but it only shows the products from the current category page id I am currently on.

Any help would be greatly appreciated.
Mynordstrom Workday
Last edited by CharlesWilliams on Mon May 23, 2022 11:48 am, edited 1 time in total.


Posts

Joined
Thu May 19, 2022 2:27 pm

Post by grgr » Fri May 20, 2022 6:28 pm

A bit more work needed. You'll have to add into the controller file, either directly, using an OCMOD or with an event.

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 111 guests