hi there,
im struggling to get my site name to show up in products etc. for example on my other site DingDongDisco (http://www.dingdongdisco.com) , if you go to a post the title in the bar at the top says Post Name | DingDongDisco (http://www.dingdongdisco.com/2009/09/kr ... osyncrasy/)
Yet on my opencart run shop, if you go to a particular product, it literally just shows the bproduct name. for example (http://www.clubberclobber.co.uk/index.p ... uct_id=158) show only Army Cheerleader outfit.
Is there anyway for it to show Army Cheerleader outfit | UK Clubwear by Clubber Clobber?
my site is indexed on google and it only shows the product name which could be problematic for SEO
cheers in advance
aaran
Clubber Clobber
http://www.clubberclobber.co.uk
im struggling to get my site name to show up in products etc. for example on my other site DingDongDisco (http://www.dingdongdisco.com) , if you go to a post the title in the bar at the top says Post Name | DingDongDisco (http://www.dingdongdisco.com/2009/09/kr ... osyncrasy/)
Yet on my opencart run shop, if you go to a particular product, it literally just shows the bproduct name. for example (http://www.clubberclobber.co.uk/index.p ... uct_id=158) show only Army Cheerleader outfit.
Is there anyway for it to show Army Cheerleader outfit | UK Clubwear by Clubber Clobber?
my site is indexed on google and it only shows the product name which could be problematic for SEO
cheers in advance
aaran
Clubber Clobber
http://www.clubberclobber.co.uk
(v1.3.2 and older)
1a. Edit catalog/view/theme/default/template/common/layout.tpl
OR
(v1.3.4 and later)
1b. Edit catalog/view/theme/default/template/common/header.tpl
2. FIND:
3. REPLACE WITH:
1a. Edit catalog/view/theme/default/template/common/layout.tpl
OR
(v1.3.4 and later)
1b. Edit catalog/view/theme/default/template/common/header.tpl
2. FIND:
Code: Select all
<title><?php echo $title; ?></title>
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
<title><?php echo $title; ?> | <?php echo $this->config->get('config_store'); ?></title>
<?php } else { ?>
<title><?php echo $title; ?></title>
<?php } ?>
New member
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 find
Code: Select all
<title><?php echo $title; ?></title>
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
It looks like it doesn't work with 1.4.8. How do i get store name in 1.4.8?Qphoria wrote:(v1.3.2 and older)
1a. Edit catalog/view/theme/default/template/common/layout.tpl
OR
(v1.3.4 and later)
1b. Edit catalog/view/theme/default/template/common/header.tpl
2. FIND:3. REPLACE WITH:Code: Select all
<title><?php echo $title; ?></title>
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?> <title><?php echo $title; ?> | <?php echo $this->config->get('config_store'); ?></title> <?php } else { ?> <title><?php echo $title; ?></title> <?php } ?>
OK this is thread has really helped me out which is cool
I replaced my title tag with this code from above:
and it produces the following page titles:
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Any ideas?
I replaced my title tag with this code from above:
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>
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Any ideas?
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Generally it is a bad idea NOT to work inside the controller.
Anyway, do NOT use the array_reverse.
Instead after the final }:
Anyway, do NOT use the array_reverse.
Instead after the final }:
Code: Select all
}
echo $this->config->get('config_title') .' - '. implode(' - ', $titleBreadCrumbs);
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
and it produces the following page titles:
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Code: Select all
<?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_values($titleBreadCrumbs);
echo implode(' - ', $titleBreadCrumbs) . ' - ';
}
echo $this->config->get('config_title');
# END - titleBreadCrumbs
?>
</title>
Chrissy Poo wrote:OK this is thread has really helped me out which is cool
I replaced my title tag with this code from above:and it produces the following page titles: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>
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Any ideas?
How can I make it show Sub Category - Category - Store Name
But for the store name just the company name i.e. MY COMPANY
instead of MY COMPANY - I SPECIALIZE IN XYZ
Thanks,
Melanie
Melanie wrote:Chrissy Poo wrote:OK this is thread has really helped me out which is cool
I replaced my title tag with this code from above:and it produces the following page titles: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>
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Any ideas?
How can I make it show Sub Category - Category - Store Name
But for the store name just the company name i.e. MY COMPANY
instead of MY COMPANY - I SPECIALIZE IN XYZ
Thanks,
Melanie
Done.
Changed 'config_title' to 'config_name'
Running OC 1.4.9.1
Require some help with simple coding please.
I have currently replaced /catalog/view/theme/my theme/template/common/header.tpl
with:
This gives me everything I am looking for in the format of:
Product - Sub cat - category - store NAME
This works fine on all category and product pages etc.
However on my ‘Homepage’ it obviously only shows ‘store NAME’ (using config_name)
How can I alter this code so that everything remains as is but on the ‘Home page’ the code shows just the “config_TITLE’
To sum up:
Homepage title to show config_title
Other pages title to show code as above with config_name
It must be something to do with an ‘if’ line but I do not know PHP to work it out myself. I have played with it but now ned someone who knows to help out please.
Any help appreciated.
Simon
Require some help with simple coding please.
I have currently replaced /catalog/view/theme/my theme/template/common/header.tpl
Code: Select all
<title><?php echo $title; ?></title>
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_name');
# END - titleBreadCrumbs
?>
</title>
Product - Sub cat - category - store NAME
This works fine on all category and product pages etc.
However on my ‘Homepage’ it obviously only shows ‘store NAME’ (using config_name)
How can I alter this code so that everything remains as is but on the ‘Home page’ the code shows just the “config_TITLE’
To sum up:
Homepage title to show config_title
Other pages title to show code as above with config_name
It must be something to do with an ‘if’ line but I do not know PHP to work it out myself. I have played with it but now ned someone who knows to help out please.
Any help appreciated.
Simon
I'd also like to have a custom homepage title that doesn't show on all pages of the site. Is this possible?
Who is online
Users browsing this forum: Amazon [Bot] and 75 guests