I need to create category: "Water". Then to add some manufacturers to this category.
Then when I click over water category link firstly sholud displayed all manufactures inside this category, after clicking manufacture name should be reirected to page with products.
How to do this in Open Cart?
Then when I click over water category link firstly sholud displayed all manufactures inside this category, after clicking manufacture name should be reirected to page with products.
How to do this in Open Cart?
A simple way to show the manufacturer among the category, for demonstration purposes, would be under your catalog/controller/product/category.php file.
Find:
add below:
In catalog/view/theme/your_theme/template/product/category.twig file,
starting from this location:
until:
you can use:
Find:
Code: Select all
'name' => $result['name'],
Code: Select all
'manufacturer' => html_entity_decode($result['manufacturer'], ENT_QUOTES, 'UTF-8'),
starting from this location:
Code: Select all
<div class="row"> {% for product in products %}
Code: Select all
{% endfor %} </div>
Code: Select all
{{ product.manufacturer }}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
In the exception of the openbay libraries, controllers and models, the structure is pretty much identical with the ways to call a specific method between controllers or loading a model, library or a theme file from either PHP or jQuery Ajax requests.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
For products featured module, in catalog/controller/extension/module/featured.php file,
simply replace the added line:
with:
simply replace the added line:
Code: Select all
'manufacturer' => html_entity_decode($result['manufacturer'], ENT_QUOTES, 'UTF-8'),
Code: Select all
'manufacturer' => html_entity_decode($product_info['manufacturer'], ENT_QUOTES, 'UTF-8'),
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The latest instructions above are about the featured module, not about the category page itself which is why while using the paging class, you don't notice the manufacturer info.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: khnaz35, paulfeakins and 41 guests