Categories in the product card opencart
Add the category opencart to the product card
Creation, development, manufacturing sites | WEB-STYDIA.COM

Greetings to you dear visitor on the pages of our site. In today's article, I want to describe the possibility of adding an opencart product category to which it is attached to the product card itself.

Many people use this option for a variety of cases, for example, when develop an online store a> I use the category output in the product card for seo promotion as an additional link.

Also in opencart by default, if you switch from a module to a product card, the bread crumbs are not displayed, for which I use this function to solve for you, I will describe only today a simple method of adding a category or categories to which the goods are attached to a product card.

In general, in order to add categories on the product page, we need to edit only two files:

catalog/controller/product/product.php and catalog/view/theme/ваш_шаблон/template/product/product.tpl

Well, let's do it:

Open the product.php file and look for:

after which we need to add:

Next, open the product.tpl file of your active template and add the following in the right place:

As I've already written, everyone uses this function at their own discretion, so you need to output wherever you need, for example, you can insert right after the model:

That's actually all that needed to be done to ensure that the category of goods displayed in the card, it will be shown exactly those categories to which the goods are tied.

This design was done on opencart branches 1.5.5 ... but it will work on other branches.
Good luck!

You may also like

No Comment

You can post first response comment.

Leave A Comment

Please enter your name. Please enter an valid email address. Please enter a message.