Page 1 of 1

[vQmod] Secondary page title for categories

Posted: Fri Feb 25, 2011 8:20 pm
by philbydevil
What it does:
Adds a "secondary title" input field in Admin->Catalog->Categories->Insert/Edit
Adds the "secondary title" to the category page title (ie. front-end)

Why would you want this:
So you can have a longer page title, but keep the actual category name short
Another way to add extra keywords to help with SEO

The outcome:
Before - Category Name
After - Category Name :: Secondary Title


I extended my product page tiles using Q's code in another thread:
Qphoria wrote: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']) ;
I wanted to do this for my categories as well, so I could have a longer page title, but keep the actual category names short. It's not as easy as doing it for the product pages, although Chones/Craig did come up with a simply solution elsewhere, but this used the keyword field, and I wasn't quite ready to let it go ;)

So, here it is as a vQmod in case anyone else is interested.

You will also need to run this SQL in your database:

Code: Select all

ALTER TABLE `category_description`
ADD `title` VARCHAR( 255 ) NOT NULL
Backup your database first, just in case. Tested on 1.4.9.3. UPDATED for 1.5.1.3

Re: [vQmod] Secondary page title for categories

Posted: Tue Apr 05, 2011 3:13 pm
by relentless1
some how this is not working for me, the Title field is not showing up on the form? I'm pretty sure vqmod is install correctly. the xml file is the correct folder

Re: [vQmod] Secondary page title for categories

Posted: Tue Apr 05, 2011 6:54 pm
by philbydevil
Do you have any other vQmods working? Any other mods that may affect this one? Did you run the SQL?

Re: [vQmod] Secondary page title for categories

Posted: Sat Jun 04, 2011 3:54 am
by promofire
Works a peach, many thanks!

Re: [vQmod] Secondary page title for categories

Posted: Sat Jun 04, 2011 7:06 pm
by opencartisalright
Any way to get this for OC 1.5?

Re: [vQmod] Secondary page title for categories

Posted: Wed Jun 08, 2011 10:22 am
by philbydevil
Have a look at the files (and lines of code) that are modified in the XML file, and see if the same files (and lines of code) are there in 1.5

I haven't had a chance to even look at 1.5 yet, so I'm not sure how much the file structure, etc has changed.

[vQmod][OC1.5] Secondary page title for categories

Posted: Mon Jul 25, 2011 8:58 pm
by Jasper84
I'd like to contribute a modified version of this vQmod for OpenCart 1.5.

Needed this mod to work since the SEO scoring of the description on my category pages is actually important for me.
My products are sort of comparable to an IKEA closet, the description of the closet is in the main category description, and there are separate product pages for each door/shelf/etc. Naturally the category description then becomes the important page for SEO.
I guess that's a rather exotic set-up, so it's understandable OpenCart doesn't support all the SEO functions here out of the box :)

[offtopic] This btw also required me to modify the default google sitemaps priorites.

Re: [vQmod] Secondary page title for categories

Posted: Thu Sep 22, 2011 8:50 am
by Eva30
philbydevil wrote:What it does:
Adds a "secondary title" input field in Admin->Catalog->Categories->Insert/Edit
Adds the "secondary title" to the category page title (ie. front-end)

Why would you want this:
So you can have a longer page title, but keep the actual category name short
Another way to add extra keywords to help with SEO

The outcome:
Before - Category Name
After - Category Name :: Secondary Title


I extended my product page tiles using Q's code in another thread:
Qphoria wrote: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']) ;
I wanted to do this for my categories as well, so I could have a longer page title, but keep the actual category names short. It's not as easy as doing it for the product pages, although Chones/Craig did come up with a simply solution elsewhere, but this used the keyword field, and I wasn't quite ready to let it go ;)

So, here it is as a vQmod in case anyone else is interested.

You will also need to run this SQL in your database:

Code: Select all

ALTER TABLE `category_description`
ADD `title` VARCHAR( 255 ) NOT NULL
Backup your database first, just in case. Tested on 1.4.9.3.
thank you.
v.nice module.

Re: [vQmod] Secondary page title for categories

Posted: Thu Dec 15, 2011 7:35 am
by misscaprice
Tweaked it a little, entered it manually and it works flawlessly.

How this can be done for the manufacturers as well?

Re: [vQmod] Secondary page title for categories

Posted: Thu Apr 05, 2012 3:34 pm
by toolsandtimber
Excellent mod! Thankyou

Re: [vQmod] Secondary page title for categories

Posted: Sat Apr 14, 2012 4:51 am
by vlaci
EDITED : I forgot to put that in database... nevermind :)

Code: Select all

ALTER TABLE `category_description`
ADD `title` VARCHAR( 255 ) NOT NULL
Thank you for this module!!


Hello

I have just installed this module and I got the following notice in my admin ->catalog->categories -> Edit a Category section.

Code: Select all

Notice: Undefined index: title in /home/barovsk/public_html/vqmod/vqcache/vq2-admin_model_catalog_category.php on line 161
What is this ?

I have basic coding knowledge.

My OC version is 1.5.1.3.

Thanks

Re: [vQmod] Secondary page title for categories

Posted: Fri May 18, 2012 10:14 pm
by Cookie1974
Can't get this to work on 1.5.2.1?

Anyone else tried?

Re: [vQmod] Secondary page title for categories

Posted: Fri Oct 26, 2012 7:36 am
by BOBKIM7080
Works great.
Is anybody know how to do also for "products"?

Re: [vQmod] Secondary page title for categories

Posted: Fri Oct 26, 2012 8:28 am
by philbydevil
Here is the vQmod for the product pages. It requires that you don't currently use "Location" (in the product data tab) for anything. Should work on most versions.

Re: [vQmod] Secondary page title for categories

Posted: Fri Nov 02, 2012 1:29 pm
by BOBKIM7080
It look like works.
But when after edit product it disappear.
I can see location field at php my admin product table.
Some how data is not saving at php my admin.
Any idea???