Post by Vindojeens » Fri Feb 15, 2019 6:10 am

Hello friends,

I have a question.
I'm using Opencart and I want to add an automatic meta descritption in the header but as I have 4 different categories, the text has to be different for each one.

Basically, I want to use a something simple like:

if category id = 22 echo <meta name="description" content="product name and some text 1">
if category id = 33 echo <meta name="description" content="product name and some text 2">
if category id = 55 echo <meta name="description" content="product name and some text 3">

I know that categoryID of a product is not specified in the header.pho controller so I would have to add it there.
Additionally I need the product's name too which is not specified in the header.php as far as I know.

Can someone please tell me what to add to the header.php so that I can do what I have intenteded?
I did some search on the forum but have not found what exactly I need.
Thanks a lot!



Sun Nov 20, 2016 12:49 am

Post by IP_CAM » Fri Feb 15, 2019 10:15 am

You might find some help on such here. And if nothing exactly matching exists, you'll have
to get it made by a Dev, I assume. ... load_id=47

I'm no longer quite active at the Forum, to reach me, better contact:
My free Opencart LIGHT Code is available on GitHub soon,
a Demoversion of it can be seen in Action here:
930+ FREE OC Extension-Repositories - from OC v.1.5.x up, on the
world's largest OC-related Github Site:

User avatar
Legendary Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 8 guests