Post by mau7038 » Thu Feb 16, 2012 1:37 am

zuhenry wrote: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 !!
I follow you up until "Translation: Add that variable - location -, to the title controller." Where is this code located, which file? I'm at catalog/controller, I assume it would be in the product.php page? However, on my product.php page, I only have the following similar code:

Code: Select all

$this->document->setTitle($product_info['name']);
I am using a non-default theme, although I didn't think that would affect the controllers. Should I change this code, or am I looking in the wrong place?

New member

Posts

Joined
Mon Feb 13, 2012 12:41 pm

Post by mau7038 » Fri Feb 17, 2012 12:15 am

Anyone? Thanks!

New member

Posts

Joined
Mon Feb 13, 2012 12:41 pm

Post by ianh » Mon Feb 20, 2012 7:45 pm

I'm having the same problem - I don't know specifically what to change and where it is. :choke:

Active Member

Posts

Joined
Fri Oct 07, 2011 4:25 pm


Post by ianh » Fri Feb 24, 2012 4:24 am

All the answers are here http://forum.opencart.com/viewtopic.php?f=21&t=53895

Big thanks to Jack Wilson.

Active Member

Posts

Joined
Fri Oct 07, 2011 4:25 pm


Post by leedodson » Sun Feb 26, 2012 10:17 pm

Hi, I really would like to do this but still a bit bewildered! Globally change all controllers? Where do I find that? and is it just one change to do?
Cheers.

Newbie

Posts

Joined
Fri Feb 24, 2012 5:48 am

Post by ianh » Thu Mar 01, 2012 12:34 am

Lee, check my post above yours....it's real simple and brilliantly effective. ;D

Active Member

Posts

Joined
Fri Oct 07, 2011 4:25 pm


Post by shukshyna » Wed Jan 02, 2013 10:00 pm

I registered for this forum to say Thank you guys!!!!
You have just made one 0-php-knowledge girl happy :)))

I changed it for my manufacturers to

$this->document->title = ($manufacturer_info['name'] . ' - ' . $w_manufacturerDescription['meta_keywords']) ;

where I will use a keywords field to make a different title for each language on a manufacturer page (earlier I have had titles on these pages duplicated)

All the best!

Newbie

Posts

Joined
Wed Jan 02, 2013 9:53 pm

Post by webcreativity » Tue Aug 20, 2013 8:03 pm

Thank you so much ! I implemented this on my website using simple vqmod.
I could attach it if someone is interested.

QUESTION is:

How can we do the same for categories ?
I urgently need it done for categories, but I can't think where to and how to import the data.
For products was easy with location.

Any ideas ?

Thank you !

Newbie

Posts

Joined
Sat Jan 30, 2010 8:15 pm
Who is online

Users browsing this forum: No registered users and 70 guests