Post by tjsystems » Wed Jan 28, 2015 9:37 pm

Hi All,

For 1.5.6. i used this mod:

http://forum.opencart.com/posting.php?m ... 20&p=36680
Qphoria wrote:1. EDIT: catalog/controller/product/product.php

2. FIND:

Code: Select all

$this->document->description = $product_info['meta_description'];
3. AFTER, ADD:

Code: Select all

$this->data['meta_description'] = $product_info['meta_description'];
4. EDIT: catalog/view/theme/YOURTHEME/template/product/product.tpl

5. PASTE THIS WHERE YOU WANT IT:

Code: Select all

<?php echo $meta_description; ?>

Anybody a idea how to get this working for 2.0/OCmod?

Live with 2.2.0.0 fully SSL.


Active Member

Posts

Joined
Sun Aug 26, 2012 5:39 pm
Location - NL, Amsterdam

Post by fido-x » Wed Jan 28, 2015 10:23 pm

In the controller (catalog/controller/product/product.php), find:

Code: Select all

$this->document->setDescription($product_info['meta_description']);
after add:

Code: Select all

$data['meta_description'] = html_entity_decode($product_info['meta_description']);
And in the template (catalog/view/theme/YOURTHEME/template/product/product.tpl), add:

Code: Select all

<?php echo $meta_description; ?>
where you want it.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by aljawaid » Mon May 18, 2015 8:37 am

fido-x wrote:In the controller (catalog/controller/product/product.php), find:

Code: Select all

$this->document->setDescription($product_info['meta_description']);
after add:

Code: Select all

$data['meta_description'] = html_entity_decode($product_info['meta_description']);
And in the template (catalog/view/theme/YOURTHEME/template/product/product.tpl), add:

Code: Select all

<?php echo $meta_description; ?>
where you want it.
Hello, just so you know, this worked perfectly for v2.0.2.0

By using your quick guide, I am using the meta description as a brief product summary above the tabs - thank you very much for making it easier. :)

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 5 guests