Answer the question
In order to leave comments, you need to log in
How to display meta data in opencart?
Hello!
Please help!! The problem is this .. The manufacturer does not display meta-data. They are in the admin panel, but on the site the code is empty. An interesting fact, the controller says
$this->document->setTitle($manufacturer_info['name']);
$this->document->setTitle($manufacturer_info['meta_title']);
$this->document->setDescription($manufacturer_info['meta_description']);
$this->document->setKeywords($manufacturer_info['meta_keyword']);
Answer the question
In order to leave comments, you need to log in
Getting data from the database in the opencart is done in models. Look in the controller for which model it is loading and look for it in the models folder.
All data displayed in templates must be written in the controller to the $data array. For meta data, for example, there should be something like
a in the template in the right place in the code:echo $meta_descriptrion;
The question is clearly outdated. But I got into it from the top Yandex search results. So, it's worth unsubscribing here :)
In such cases, it's done like this:
So you will know exactly what is in the variable in a specific part of the script program.
var_dump($manufacturer_info['meta_title']);
I have a similar problem. 2 weeks I can not decide, I asked on the forums, but there is no answer.
Version ocStore 3.0.2.0 does not display meta_h1 in products, instead it displays the name of the product.
I write everything in the fields. I have already verified the files many times, looked at the controller, etc.
I'm not a developer, but just a SEO specialist and I need to find and fix it.
It turns out that H1 is present, but is not displayed, and instead of it, the name of the product is substituted by condition.
The feeling that something is blocking the output. Maybe something in the database or somewhere else.
Other meta tags work and the category title is displayed. It is the plug with the goods.
Tell me where to dig, where to look, etc.
Thanks for the help ... I hope this problem should be resolved
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question