Arbitrary output of the manufacturer in opencart
Display the manufacturer in the right place of the opencart template
Creation, development, manufacturing sites | WEB-STYDIA.COM

5/51 rating

Greetings to you dear visitor on the pages of our site, where we occasionally publish useful tips for opencart, and not only for this engine online store, we can find various notes that will be useful to any webmaster, both a novice developer and professionals can emphasize for themselves something new.

Today I would like to describe a simple method of outputting an opencart producer at an arbitrary location in your store. By default in the engine of this online store the manufacturer is displayed exactly in specific places, but there are situations when you need to display the manufacturer for example in the product basket.

Today, just one of the users of our site asked us for help in this matter, he needed to add a display of the manufacturer in the shopping cart, in the buyer's history, and also change the fields in the opencart order letter, so that the brand would show up there.

Development of an online store as I understood it started only recently, its subjects furniture online store, work in this store as they say no end, but in this case the task was just to show the manufacturer in an arbitrary location of the store, he certainly decided to use this field for other purposes, but still ...

PS: By the way, if you need to bring out the logo of the manufacturer opencart in the product card, I recommend reading this article by reference here.

Well, I will not, as they say, pull the cat for its virtues :), but we will start to solve the problem, especially since it is not so difficult already. Add the manufacturer, we will in this example, specifically in the order basket, in other places do everything by analogy, with the exception of some small moments.

We will make all changes only in two files:

And so, first open the file of the controller cart.php

We find the line:

After which we add:

Next we need to find the line:

And right after it, add:

Further we find:

And in the array below, we need to add:

For example, you can insert after:

That's all that needed to be done in the order basket inspector. Now we only need to bring the manufacturer to the right place in the template, and so open the file cart.tpl and add the following in the right place:

In this case, the customer needed to be displayed under the name of the product, so I added it after:

Well, that's all, and all that needed to be done, that the manufacturer was displayed in the order basket.

Try it and you will succeed.

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.