Community Forums

Meta keywords for OpenCart

Put any free vQmod scripts here.
vQmod details

Meta keywords for OpenCart

Postby leew87 » Tue Jan 17, 2012 12:07 pm

hi

i wonder if anyone can help me i am trying to write my 1st vqmod to add meta keywords field to the admin side of opencart.

i am trying to make the following changes to my opencart store running 1.5.1.2 found in http://www.guru.net.nz/blog/2011/11/met ... ncart.html

but when i upload my xml file to the /vqmod/xmland reload my ste my site does not load and i get a white page i have checked for the vqmod.og file to show me where the errors aare but this is empty.

Code: Select all
<modification>

   <id>metakeywords 2 admin</id>
   <version>1.0</version>
   <vqmver>2.0</vqmver>
   
   <file name="admin/controller/setting/setting.php">
      <operation>
         <search position="after"><![CDATA[
         $this->data['entry_meta_description'] = $this->language->get('entry_meta_description');
         ]]></search>
         <add><![CDATA[
         $this->data['entry_meta_keywords'] = $this->language->get('entry_meta_keywords');
         ]]></add>
      </operation>
   </file>
   
   <file name="admin/controller/setting/setting.php">
      <operation>
         <search position="after"><![CDATA[
         config_meta_description
         ]]></search>
         <add><![CDATA[
         if (isset($this->request->post['config_meta_keywords'])) {
   $this->data['config_meta_keywords'] = $this->request->post['config_meta_keywords'];
} else {
   $this->data['config_meta_keywords'] = $this->config->get('config_meta_keywords');
}
         ]]></add>
      </operation>
   </file>
   
   <file name="admin/language/english/setting/setting.php">
      <operation>
         <search position="after"><![CDATA[
         entry_meta_description
         ]]></search>
         <add><![CDATA[
         <tr>
  <td><?php echo $entry_meta_keywords; ?></td>
  <td><input type="text" name="config_meta_keywords" value="<?php echo $config_meta_keywords; ?>" />
    <?php if ($error_entry_meta_keywords) { ?>
    <span class="error"><?php echo $error_entry_meta_keywords; ?></span>
    <?php } ?></td>
</tr>
         ]]></add>
      </operation>
   </file>
   
   <file name="admin/view/template/setting/setting.tpl">
      <operation>
         <search position="after"><![CDATA[
         config_meta_description </tr>
         ]]></search>
         <add><![CDATA[
         $_['entry_meta_keywords']     = 'Meta Tag Keywords:';
         ]]></add>
      </operation>
   </file>
   
   <file name="catalog/controller/common/home.php">
      <operation>
         <search position="after"><![CDATA[
         config_meta_description
         ]]></search>
         <add><![CDATA[
         $this->document->keywords = $this->config->get('config_meta_keywords');
         ]]></add>
      </operation>
   </file>
   
</modification>


any advise on where i am going wrong and how i can get this working would be a great help please PM me or reply to this message for any more information you require.

thanks in advance
leew87
 
Posts: 25
Joined: Sat Jun 25, 2011 1:27 pm

Re: Meta keywords for OpenCart

Postby philbydevil » Wed Jan 18, 2012 10:00 pm

I think that your modification of catalog/controller/common/home.php is wrong (haven't looked too closely at the rest of the code).

Here's my vqmod of the same thing. I used to run it on 1.4.9.3 and have just updated it for 1.5.1.3 (tested and working).
1513-vqmod_catalog_meta_keywords_for_home_page.xml
1.5.1.3 version
(2.25 KiB) Downloaded 384 times


Now updated for 1.5.4.1
1541-vqmod-catalog-meta-keywords-for-home-page.xml
1.5.4.1 version
(2.25 KiB) Downloaded 401 times
Last edited by philbydevil on Wed Aug 22, 2012 11:54 pm, edited 1 time in total.
I Image cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
User avatar
philbydevil
 
Posts: 828
Joined: Thu Dec 02, 2010 9:20 pm
Location: Sunshine Coast, Australia

Re: Meta keywords for OpenCart

Postby leew87 » Wed Jan 18, 2012 10:23 pm

thanks so much i will compare the to mods to see where i have gone wrong and learn from your working code.

as this is my 1st vqmod that i have tried working hopefully i have more luck getting it right next time.

as they say if you don't succeed at first try try try again.

my next challenges are

1) to add my 2 social media buttons i have hard coding into the header file using Vqmod so hard coding is not needed
2) moving the cart and search bar i have on my site to new location using vqmod from the original location in template.

This will make it sooooo much easier when upgrading or installing bug fixes to my template i use have customised.

Thanks again
leew87
 
Posts: 25
Joined: Sat Jun 25, 2011 1:27 pm

Re: Meta keywords for OpenCart

Postby philbydevil » Wed Jan 18, 2012 10:27 pm

When you do the "search position" (ie. <search position="after"><![CDATA[ )in your vQmod, be sure to include the entire line of code. Some of the searches in your post look like they are only a part of the line of code.
I Image cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
User avatar
philbydevil
 
Posts: 828
Joined: Thu Dec 02, 2010 9:20 pm
Location: Sunshine Coast, Australia

Re: Meta keywords for OpenCart

Postby leew87 » Wed Jan 18, 2012 10:33 pm

Code: Select all
<modification>

   <id>Custom Template Edits</id>
   <version>2.0.0</version>
   <vqmver>2.1.5</vqmver>
   <author>ILL IT Solutions</author>

   <file name="/catalog/view/theme/ModernStore/template/common/header.tpl">
        <operation>
            <search position="after"><![CDATA[
            <div id="header_top">
            ]]></search>
            <add><![CDATA[
            <div><a href="http://twitter.com/#!/illitsolutions"><img src="image/data/siteparts/twitter_button.png" alt="Twitter" width="118" height="59" /></a></div>
   <div><a href="http://www.facebook.com/ILLITSolutions"><img src="image/data/siteparts/facebook_button.png" alt="Facebook" width="118" height="59" /></a></div>
            ]]></add>
        </operation>


</modification>


this is what i have as in my current header.tpl file if i add that coding after the search it will give me what is hard coded but when i run it doesnt seem to do anything but i do get the follow error now Caught exception: DOMDocument::load() [<a href='domdocument.load'>domdocument.load</a>]: Opening and ending tag mismatch: file line 8 and modification in /home/illit/public_html/vqmod/xml/vqmod_Custom_Template Edits.xml, line: 20 in the vqmod.log file.

i really cant understand what i am doing wrong
leew87
 
Posts: 25
Joined: Sat Jun 25, 2011 1:27 pm

Re: Meta keywords for OpenCart

Postby leew87 » Fri Jan 20, 2012 10:44 am

i have now found out the problem i was missing the closing tag for the file part of the XML so i added </file> before the
</modification> in the XML and all now works fine.

just a quick question do you know if it is possiable to edit css files using vqmod
leew87
 
Posts: 25
Joined: Sat Jun 25, 2011 1:27 pm

Re: Meta keywords for OpenCart

Postby philbydevil » Fri Jan 20, 2012 11:17 pm

just a quick question do you know if it is possiable to edit css files using vqmod


I haven't tried it myself but I don't see why it wouldn't work.
I Image cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
User avatar
philbydevil
 
Posts: 828
Joined: Thu Dec 02, 2010 9:20 pm
Location: Sunshine Coast, Australia

Re: Meta keywords for OpenCart

Postby leew87 » Sat Jan 21, 2012 10:39 am

do you know if or how is possiable to get the xml script just to add coding at the end of the file without adding before or after or even replacing

as if this is possiable i could use this so any Css changes i add using Vqmod would just go at the end of the main template css this would allow me to upgrade all files on the templates and not worry if they are over written as vqmod does not get over written each time.

i have found you can you a comand called bottom but can not find a script where is this used so i can see the correct syntax for it.

onces again i thank you for all your assistance
leew87
 
Posts: 25
Joined: Sat Jun 25, 2011 1:27 pm

Re: Meta keywords for OpenCart

Postby philbydevil » Sat Jan 21, 2012 9:31 pm

Try something like this:
Code: Select all
   <file name="catalog/view/theme/YOURTHEME/stylesheet/stylesheet.css">
        <operation>
            <search position="bottom"><![CDATA[
            You don't need any code here as it will be ignored
            ]]></search>
            <add><![CDATA[
            INSERT YOUR NEW CODE HERE
            ]]></add>
        </operation>
   </file>
I Image cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
User avatar
philbydevil
 
Posts: 828
Joined: Thu Dec 02, 2010 9:20 pm
Location: Sunshine Coast, Australia

Re: Meta keywords for OpenCart

Postby SVN » Mon Feb 06, 2012 12:08 pm

Hi,

is there a possibility that this vQmod works on 1.4.9.6 ?

thx !
User avatar
SVN
 
Posts: 204
Joined: Mon Jan 03, 2011 3:59 pm

Re: Meta keywords for OpenCart

Postby philbydevil » Tue Feb 07, 2012 2:04 am

There's a 1.4 version in vQmods that should
I Image cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
User avatar
philbydevil
 
Posts: 828
Joined: Thu Dec 02, 2010 9:20 pm
Location: Sunshine Coast, Australia

Re: Meta keywords for OpenCart

Postby Mr Hot Pants » Fri Sep 07, 2012 11:04 am

Philbydevil

Thank you so much for this vQmod - it works perfectly in 1.5.4.1 and it's really easy to use.

Thanks again
Mr Hot Pants
 
Posts: 2
Joined: Sat Jul 28, 2012 5:31 pm

Re: Meta keywords for OpenCart

Postby sataan2006 » Thu Oct 11, 2012 5:02 am

philbydevil wrote:I think that your modification of catalog/controller/common/home.php is wrong (haven't looked too closely at the rest of the code).

Here's my vqmod of the same thing. I used to run it on 1.4.9.3 and have just updated it for 1.5.1.3 (tested and working).
1513-vqmod_catalog_meta_keywords_for_home_page.xml


Now updated for 1.5.4.1
1541-vqmod-catalog-meta-keywords-for-home-page.xml


Thank you from thailand. I use your keyword VQMOD and work for 1.5.2.1

really thank you

Tan
User avatar
sataan2006
 
Posts: 3
Joined: Wed Jul 11, 2012 11:15 am
Location: Thailand

Re: Meta keywords for OpenCart

Postby tomatito » Tue Feb 26, 2013 12:46 am

Thanks :) Works perfect with Opencart 1.5.4.1.
tomatito
 
Posts: 199
Joined: Fri Oct 12, 2012 8:15 pm


Return to vQmods

Who is online

Users browsing this forum: No registered users and 15 guests

Hosted by Arvixe Web Hosting