Post by philbydevil » Tue Feb 08, 2011 10:52 am

Someone was asking about having meta descriptions for information pages and I though "hey, I think I want this too".

So here's the vQmod for it.

Apart from the attached xml file, you also need to run an SQL update:

Code: Select all

ALTER TABLE `information_description`
ADD `meta_description` VARCHAR( 255 ) NOT NULL
Back up your database first.

Tested on 1.4.9.3


EDIT: 1.5.1.3 version was buried down below so I placed it up here for easy access.

Attachments

for 1.5.x shops

for 1.4.9.3 shops and maybe 1.4.9.x

Last edited by philbydevil on Tue Jan 17, 2012 12:51 pm, edited 1 time in total.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by dony_b » Wed Mar 16, 2011 5:46 am

Where do you upload the xml file exactly ?

Thanks

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA

Post by philbydevil » Wed Mar 16, 2011 6:06 am


I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by opencartisalright » Sat Jun 04, 2011 7:10 pm

Any chance this will be updated for OC 1.5?

Active Member

Posts

Joined
Mon Feb 21, 2011 4:09 am

Post by philbydevil » Wed Jun 08, 2011 10:20 am

Not at this stage (at least by me anyway).

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by opencartisalright » Sat Jul 09, 2011 10:28 am

I'm getting the below error with this vQmod. Any idea how to fix it? Shouldn't it say Meta Description instead of entry_meta_description?
Screen shot 2011-07-09 at 9.25.28 AM.png

Screen shot 2011-07-09 at 9.25.28 AM.png (6.08 KiB) Viewed 12512 times


Active Member

Posts

Joined
Mon Feb 21, 2011 4:09 am

Post by philbydevil » Mon Jul 11, 2011 3:23 pm

What version are you using? Is your language English?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by jcsmithy » Mon Jul 11, 2011 7:12 pm

Attached is the updated version for 1.5.0.x

Use the same SQL in the first post.

Attachments


Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by webpie it. » Tue Jul 12, 2011 4:25 am

Good call J!

Regards

Chris


Active Member

Posts

Joined
Mon Jan 31, 2011 7:28 pm

Post by kmg_123 » Wed Jul 13, 2011 3:59 pm

opencartisalright wrote:I'm getting the below error with this vQmod. Any idea how to fix it? Shouldn't it say Meta Description instead of entry_meta_description?
Screen shot 2011-07-09 at 9.25.28 AM.png

I have same problem V1.4.9.5

New member

Posts

Joined
Tue Jul 12, 2011 12:21 am
Location - UAE, Abu Dhabi

Post by kmg_123 » Wed Jul 13, 2011 4:12 pm

kmg_123 wrote:
opencartisalright wrote:I'm getting the below error with this vQmod. Any idea how to fix it? Shouldn't it say Meta Description instead of entry_meta_description?
Screen shot 2011-07-09 at 9.25.28 AM.png

I have same problem V1.4.9.5

OK I added it manually it works really :)
admin/language/english/catalog/infromation.php
find line 15 Aprox

Code: Select all

 $_['entry_title']       	= 'Information Title:';  
Add after it :

Code: Select all

$_['entry_meta_description'] = 'Meta Description:';  

New member

Posts

Joined
Tue Jul 12, 2011 12:21 am
Location - UAE, Abu Dhabi

Post by opencartisalright » Thu Jul 14, 2011 5:44 pm

philbydevil wrote:What version are you using? Is your language English?
I'm using 1.4.9.5 and my language is English. I don't have any other languages installed. I checked my vQmod log file and this is the error it's throwing up:

----------------------20110714-164017-------------------------
SOURCEFILE: /home/xxxxxxxx/public_html/admin/language/english/catalog/information.php
MODFILE: /home/xxxxxxxx/public_html/vqmod/xml/vqmod_meta_description_for_information_pages.xml
SEARCH: $_['entry_sort_order'] = 'Sort Order:';
OPERATION FAILED (ABORTED): NO MATCH FOR SEARCH!
--------------------------------------------------------------

It's because in version 1.4.9.5, the language file has been modified. So the vQmod would need to be updated to this:

Find:

Code: Select all

<file name="admin/language/english/catalog/information.php">
        <operation>
            <search position="after"><![CDATA[
            $_['entry_sort_order']  	= 'Sort Order:';
            ]]></search>
            <add><![CDATA[
            $_['entry_meta_description'] = 'Meta Description:';
            ]]></add>
        </operation>
	</file>
Replace with:

Code: Select all

<file name="admin/language/english/catalog/information.php">
        <operation>
            <search position="after"><![CDATA[
            $_['entry_sort_order']      = 'Sort Order:<br/><span class="help">Set to -1 to hide from listing</span>';
            ]]></search>
            <add><![CDATA[
            $_['entry_meta_description'] = 'Meta Description:';
            ]]></add>
        </operation>
	</file>
Then the problem is fixed. :)
Last edited by opencartisalright on Thu Jul 14, 2011 6:04 pm, edited 2 times in total.

Active Member

Posts

Joined
Mon Feb 21, 2011 4:09 am

Post by opencartisalright » Thu Jul 14, 2011 6:00 pm

kmg_123 wrote:
kmg_123 wrote:
opencartisalright wrote:I'm getting the below error with this vQmod. Any idea how to fix it? Shouldn't it say Meta Description instead of entry_meta_description?
Screen shot 2011-07-09 at 9.25.28 AM.png

I have same problem V1.4.9.5

OK I added it manually it works really :)
admin/language/english/catalog/infromation.php
find line 15 Aprox

Code: Select all

 $_['entry_title']       	= 'Information Title:';  
Add after it :

Code: Select all

$_['entry_meta_description'] = 'Meta Description:';  
LOL, well manually doing anything defeats the purpose of vQmod.

Follow the instructions in the above post and you don't have to make any manual modification. It will work for 1.4.9.5 ;)

Active Member

Posts

Joined
Mon Feb 21, 2011 4:09 am

Post by crabwolf » Tue May 08, 2012 5:27 am

By the way, the '&' in the author tag in the v.1.5 version of the vQmod prevented it from working for me. Just had to remove it to get it to work.

Newbie

Posts

Joined
Thu Jan 26, 2012 12:14 am

Post by philbydevil » Tue May 08, 2012 2:06 pm

crabwolf wrote:By the way, the '&' in the author tag in the v.1.5 version of the vQmod prevented it from working for me. Just had to remove it to get it to work.
Strange... works fine for me with the "&" in place.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by soleildusud » Fri Jun 15, 2012 5:35 pm

Hello I have tried your vqmod_meta_description_for_information.xml
In the admin part I've got the textarea to insert meta description but in my site it doesn't appear on the code.

I use opencart the french version 1.5.1.1 and my own template

Should i add something in my template to have the <meta name="description" content="blablabla"/> showing up in the code page?

thanks for your help

Newbie

Posts

Joined
Fri Jul 22, 2011 1:40 am

Post by philbydevil » Wed Jun 27, 2012 6:09 am

This last bit of the vQmod makes the meta description show in the catalog:

Code: Select all

	<file name="catalog/controller/information/information.php">
        <operation>
            <search position="after" index="1"><![CDATA[
            $this->document->setTitle($information_info['title']);
            ]]></search>
            <add><![CDATA[
            $this->document->setDescription($information_info['meta_description']);
            ]]></add>
        </operation>
	</file>
There's only language specific stuff in the admin side of things, so it shouldn't be the language affecting it... What shows up in your error log?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by heovang » Sat Oct 06, 2012 4:20 am

Hi Guys

Thank you for this great mod.

However in v1.5.4, I can see the Meta Description box, I can enter new descriptions and click Save. There is a confirmation that Success: You have modified information.

But when I go back in the Information, the entry in the Meta Description is just blank, also the page source code does not say Meta Description also. I think something to do with the database

Any ideas please ?

Thanks

Newbie

Posts

Joined
Fri Oct 05, 2012 10:52 pm

Post by philbydevil » Sat Oct 06, 2012 5:46 am

Something may have changed in 1.5.4.1, I'll look into it when I get a chance. You did run the SQL as well?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by philbydevil » Sat Oct 06, 2012 4:51 pm

Nope. Nothing has changed. Did you run the SQL?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am
Who is online

Users browsing this forum: No registered users and 1 guest