Can someone put here same code to adding in title a breadcrumbs for v1.5.4.1
Please!
Working for OC 1.5.5.1
Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya
working great on my website, check this out www.chantiqbutik.com
thanks
thanks
Open the header.php file (catalog/controller/common) change line 4 to something like this:
Open your home.php (same directory), change line 4 to this:
Code: Select all
if($this->document->getTitle()!='')
{
$data['title'] = $this->config->get('config_name') . ' :: ' .$this->document->getTitle();
}else{
$data['title'] = $this->config->get('config_meta_title') ;
}
Code: Select all
$this->document->setTitle('');
Hi guys! This code is not working on Opencart 2.2.0.0matteo84 wrote:Hi Paola!paola84 wrote:How can I make this modification in v1.4.7 ?
I'm new to OpenCart... so i don't know if this is the best way to solve the problem.
In /catalog/controller/view/theme/default/template/common/header.tpl approximately at line #5 you'll findReplace this line with this code...Code: Select all
<title><?php echo $title; ?></title>
This should solve your problem.Code: Select all
<title> <?php # BEGIN - titleBreadCrumbs if(!empty($this->document->breadcrumbs)) { $titleBreadCrumbs = array(); foreach($this->document->breadcrumbs as $breadcrumb) { if($breadcrumb['text'] != $this->language->get('text_home')) $titleBreadCrumbs[] = $breadcrumb['text']; } $titleBreadCrumbs = array_reverse($titleBreadCrumbs); echo implode(' - ', $titleBreadCrumbs) . ' - '; } echo $this->config->get('config_title'); # END - titleBreadCrumbs ?> </title>
Regards.
Matteo
Do you have any idea how can i fix it?
For 2.2, you DO NOT need to do $this->config->get as this is already included in the header controller.
just replace with
Hope this helps someone struggling with getting this to work in 2.2.
just replace
Code: Select all
$this->config->get('config_name')
Code: Select all
$name
Nice1, finally got it to work with this, how would i change it so domain comes after category and product info, Thanks.mogwaycz wrote: ↑Thu Jan 26, 2012 11:09 amFor OC 1.5.1.3:
in catalog/controller/product/product.php find:and replace:Code: Select all
$this->document->setTitle($product_info['name']);
in catalog/controller/product/category.php find:Code: Select all
if (isset($product_info['manufacturer'])) { $this->document->setTitle('YOURDOMAIN.XYZ - '. $product_info['name'] . ' od ' . $product_info['manufacturer']); } else { $this->document->setTitle('YOURDOMAIN.XYZ - '. $product_info['name']); }
and replace:Code: Select all
$this->document->setTitle($category_info['name']);
That's all...Code: Select all
$this->document->setTitle('YOURDOMAIN.XYZ - ' . $category_info['name']);
Who is online
Users browsing this forum: No registered users and 2 guests