Output attribute category when you hover opencart
Π’Ρ‹Π²ΠΎΠ΄ Π°Ρ‚Ρ€ΠΈΠ±ΡƒΡ‚ΠΎΠ² Π² ΠΊΠ°Ρ‚Π΅Π³ΠΎΡ€ΠΈΠΈ ΠΏΡ€ΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ opencart
πŸ’Ό Creation of modern websites of any complexity. | πŸ‘Œ WEB-UKRAINE.COM

Output attribute category when you hover opencart

5/58 ratings

Good day dear users!

For a long time I did not write anything here, today, one of the clients required to withdraw in terms of, in shares, in the search itd ... except for the ability to display basic information about the product yet and all the attributes that are present in the product, in this regard, I I decided to publish the decision of the question here.

This article and many others on our website by and large written as a note for myself, but I'll be glad if you will come in handy this information.

And so, today, I will try to briefly describe all the steps of how to list items on the site, that is, the categories and the like display attributes to the goods, do we two solutions, the first is what we derive all available product attributes and the second way is to conclude only those attributes that you need that is selectively.

All the actions we will carry on opencart 1,5 ...

The first thing we need to make some changes in the category of controller (If you add to shares, search, manufacturers ... What do all similar)

Open the file:

And in it after the line:

Add:

With the controller completed now proceed to file category.tpl our active template in the store:

Find the unit responsible for the output of goods, each pattern of his style can be different and in any place we add the code shown below I have added it to your template before the final product DIV block.

The above piece of code we display all available product attributes.

If you want to display is defined custom attributes instead of the above piece of code, we add the following code:

Pay attention on the list tsiferok code 12, 13, 14, 15, ..... it is precisely our selected these attributes, that is where we add a comma-separated attribute ID.

Check ID attribute is very simple, go to the admin panel in the Attributes tab, and on the other hand, we desired to display an attribute click to change the browser bar to watch the link at the end of the link will be displayed attribute ID.

In total, you should already appear in the category attributes, but they would look without the formatting, to put it mildly crooked.

To our attributes nice looking, we need to add to them a little style, styles, in this example, I'll point out the ones that I have used for your website, you will also probably have to tinker with them a little bit for yourself!

And so in this example, I bring it attributes when you hover on the product, that is, they are hidden initially, but as soon as we direct the mouse pointer to the desired item appears to us the attributes. Example You can look at the photo in the article!

So add to your stylesheet template code style:

That's basically it.

There are several variants of this decision, but in my opinion he seemed to me the most correct and simple.

General try if something will not work or you want to offer a different solution to write in the comments!

You may also like

No Comment

You can post first response comment.

Leave a Reply

Π’ΠΈΠ±Π΅Ρ€Ρ–Ρ‚ΡŒ спосіб спілкування
Звязатися Π· Π½Π°ΠΌΠΈ!
Ми Π³ΠΎΡ‚ΠΎΠ²Ρ– Π΄ΠΎ Π΄Ρ–Π°Π»ΠΎΠ³Ρƒ.