Page 1 of 2

how to add custom TITLE to every product pages ?

Posted: Mon Jan 18, 2010 8:41 am
by jkungfu
i know every page has its own meta description option, and only the home page has its own TITLE.

i want to every page has its own TITLE , not using only the product name or category name as the page title!

how to do ?

Re: how to add custom TITLE to every product pages ?

Posted: Mon Jan 18, 2010 10:05 am
by Qphoria
the product controller has

Code: Select all

$this->document->title = $product_info['name'];
that is what gives it the name. You could use an existing product field that you don't need like "location" and use that as your title field. Then globally change all controllers to:

Code: Select all

$this->document->title = ($product_info['name'] . ' :: ' . $product_info['location']) ;

Re: how to add custom TITLE to every product pages ?

Posted: Mon Jan 18, 2010 10:35 am
by jkungfu
if i add the 'location' in database, i think it should be 'product_description' table, if i add a field named 'location' next to 'description' field.

should i define the keywords 'location' in php sourcecode ? where and how to do it ?


if possible , i would like to add 'location' item in producut of admin pages,just in the middle of Product Name: any Meta Tag Description:
(of course , the direct operation of database is more fast!)

Re: how to add custom TITLE to every product pages ?

Posted: Mon Jan 18, 2010 10:38 am
by Qphoria
no. there already is a location field. but its usually not used by anyone i know so I always recommend that since it's already there. You don't have to do any db or code edits.. If you were going to add your own field then you wouldn't call it "location" you would add it to product_description and call it "title" but thts a lot of work

Re: how to add custom TITLE to every product pages ?

Posted: Mon Jan 18, 2010 10:52 am
by jkungfu
thanks you very much, i had test it ,i add a product_title field in product_description table,and add a category_title field in category_description table, and $this->document->title = ($product_info['name'].'|'.$product_info['product_title']) ; works fine !!!!!!!!!!


thank you!

i had another question bothering me for a long time, i should buy a space that use apache,however, I mistakenly purchased a iis6 space, and i want to use url rewrite, but i dont know how to change the .htaccess file, can you help me ?

Re: how to add custom TITLE to every product pages ?

Posted: Tue Mar 16, 2010 4:47 am
by sujaypawar
Hello Qphoria, jkungfu

I can not find where to extend limit of home page "meta description" as i did for "product" and "category page"
Also the i cant find "Location" field in data base, please explain me where to find or How to add new "Column" in Table

Thank you in advance :)

Re: how to add custom TITLE to every product pages ?

Posted: Fri Mar 26, 2010 4:55 pm
by basics
I just wanted to say thankyou for this, did the mod on the meta title in a matter of seconds and it works absolutely fine!

Keep up the good work ;D

Re: how to add custom TITLE to every product pages ?

Posted: Tue Apr 06, 2010 3:59 am
by sizzlingscience
jkungfu wrote:thanks you very much, i had test it ,i add a product_title field in product_description table,and add a category_title field in category_description table, and $this->document->title = ($product_info['name'].'|'.$product_info['product_title']) ; works fine !!!!!!!!!!
I'm very keen to add Title Tags to my site for the category / product pages.

I've managed to add the fields to my database and have tried adding the info directly in there and then changing the category.php but I'm getting a bit lost as it's not showing up.

Would you mind expanding on how you managed to achieve it?

Thank you so much. Melanie.

Re: how to add custom TITLE to every product pages ?

Posted: Fri Aug 27, 2010 10:17 pm
by stonehinged
I have added the code necessary to edit the custom title tag from the admin side. I am using OC 1.4.7. I simply used the same code formatting similar to meta_description line and replaced references to 'title' matching the new field in the db.

The store edit:
catalog/controller/product/category.php
- title tag to use title field added to database LINE 49
$this->document->title = $category_info['title'];

The admin edits:
admin/controller/catalog/category.php
- value for title LINE 52

admin/model/catalog/category.php
- value for title LINE 14

admin/language/english/catalog/category.php
- value for title LINE 16
$_['entry_title'] = 'Category Page Title:';

admin/model/tool/export.php
- value for title LINE 455, LINE 910

I'm no PHP expert by any stretch of the imagination, hardly a novice, but it seems the magic connection to making things appear in the admin lies with the export.php file.

Hope this helps some. Working great for me.

Re: how to add custom TITLE to every product pages ?

Posted: Tue Jan 25, 2011 3:55 pm
by jcgadgets
Hi,

I've got OC 1.4.9.3. I'm just not sure how to "globally change all controllers"? Sorry for a dumb question :S


Thank you,
Jared

Re: how to add custom TITLE to every product pages ?

Posted: Fri Feb 25, 2011 4:26 am
by atxutexas05
I wish we could have a easy module like the Wordpress SEO Ultimate where you can do a title tag rewriter all in one simple step. I really would like to easily be able to have custom title, meta description and keywords for each page on my site. Any help or guidance would be greatly appreciated!

Re: how to add custom TITLE to every product pages ?

Posted: Mon May 23, 2011 4:13 am
by promofire
How could I do this for category pages? We have to keep the category names short for our Megamenu but we need more info in the title tag for the search engines. How would I do that?

Re: how to add custom TITLE to every product pages ?

Posted: Tue Jul 05, 2011 4:38 pm
by Rabbitdigital
Yes I agree with atxutexas05, I would be willing to pay for a module like the Wordpress 'All in One SEO Pack' for OpenCart, does anyone know if one exists yet?

Cheers
Warren

Re: how to add custom TITLE to every product pages ?

Posted: Tue Aug 09, 2011 1:06 pm
by KocksEnt
Is there a way to just simply append the price to the front of the meta title. I think if people see the price of the item right in the search page, they will be more likely to go to my site.

Re: how to add custom TITLE to every product pages ?

Posted: Sun Oct 09, 2011 3:52 am
by Dave2828
Hi using Version 1.5.1.3 and would like a dummy's guide to adding meta titles to all pages not just home page and all products /Categories. Anyone done this and if so how easy is it. Quite happy to pay someone to do it for me if price is affordable.
Cheers Dave .

Re: how to add custom TITLE to every product pages ?

Posted: Sun Oct 16, 2011 6:53 am
by revelation
I really wonder why this isn't standard. If you look at the features of Opencart, it has a checkpoint that says: Search Engine Optimization (SEO) ... I would hardly call a platform that doesn't have user-editable fields for title tags "Search Engine Optimized". Kind of a BIG oversight in terms of SEO. Guess I have to pay for a module just to have this basic feature.

Re: how to add custom TITLE to every product pages ?

Posted: Mon Jan 02, 2012 12:53 am
by jeoob
Could someone tell me which files to adjust and how for 1.5.1.3 please?

Re: how to add custom TITLE to every product pages ?

Posted: Fri Feb 03, 2012 10:28 pm
by ianh
I'm a little confused as to how the 'location' field title tag works. Is this in addition to the product title? Apologies, but I don't really understand what is needed in order to set the location field up to act as a title tag. I looked at the code above but I don't quite get what I need to do. ?? help would be much appreciated :)

Re: how to add custom TITLE to every product pages ?

Posted: Sat Feb 04, 2012 2:21 pm
by zuhenry
It is easy. Qphoria explained in a very easy way but it could be complicated if you are not good with mathematics or associations.
Qphoria says: "the 'variable' (location) is rarely used by any OC administrator"
Translation: Under the admin panel, use location to set the page title. Pretend 'location' means 'title'
Qphoria says: "globally change all controllers to... "
Translation: Add that variable - location -, to the title controller.
Before: $this->document->title = $product_info['name'];
After: $this->document->title = ($product_info['name'] . ' :: ' . $product_info['location']) ;

Thanks Qphoria !!

Re: how to add custom TITLE to every product pages ?

Posted: Wed Feb 08, 2012 3:40 am
by ianh
Thank you. It makes more sense now. Sometimes I get it, sometimes I don't, haha. Good days bad days. Thanks again.