Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2008
    Posts
    207
    Plugin Contributions
    0

    Default Desperately need help on this please

    For several week now I've been having problems with the meta tags on my home page.

    I am using 1.3.7

    The title and keywords are fine but the description is just a mixture of the title and keywords whereas I want to say something more specific. I have followed these instructions:

    1. open your /includes/languages/english/YOURTEMPLATE/meta_tags.php

    2. add a new line anywhere between the <?php and the closing ?> which says:
    PHP Code:
    define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'blah blah blah blah');
    (substituting blah blah blah with your preferred home-page-only description, naturally)

    3. edit /includes/modules/YOURTEMPLATE/meta_tags.php
    around line 138 you have:
    PHP Code:
    define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
    change that to:
    PHP Code:
    define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
    4. Submit to search engines and watch closely




    This is an extract from my two files:

    1. includes/modules/classic/meta-tags.php

    f (isset($_GET['manufacturers_id'])) {
    $sql = "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
    $manufacturer_metatags = $db->Execute($sql);
    if ($manufacturer_metatags->EOF) {
    define('META_TAG_TITLE', TITLE . TAGLINE);
    define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
    define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)));
    } else {
    define('META_TAG_TITLE', str_replace('"','', $manufacturer_metatags->fields['manufacturers_name'] . PRIMARY_SECTION . TITLE . TAGLINE));




    2. includes/ languages/english/clssic/meta tags.php

    <?php
    define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'An enchanting boutique packed with gorgeous childrens clothes and fancy dress costumes for special occasions, parties, birthdays, weddings, Christmas, Halloween......or simply to have fun');
    /**
    * @package languageDefines
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: meta_tags.php 4273 2006-08-26 03:13:52Z drbyte $
    */

    // page title
    define('TITLE', 'Fairytale Fashions - Childrens Clothes and Fancy Dress Costumes');

    // Site Tagline
    define('SITE_TAGLINE', 'An enchanting boutique packed with gorgeous childrens clothes and fancy dress costumes for special occasions, parties, birthdays, weddings, Christmas, Halloween......or simply to have fun!');

    // Custom Keywords
    define('CUSTOM_KEYWORDS', 'Childrens Fancy Dress, Kids Fancy Dress, Childrens Dressing Up, Kids Dressing Up, Animal Fancy Dress, Kids Designer Wear, Kids Designer Clothes, Childrens Designer Clothes, Childrens Designer Wear, Fairy Dresses, Kids Skirts, Teenwear, Kids Clothes Online, Childrens Clothes Online, Ballerina Dresses, Nativity Costumes, Nursery Rhyme Costumes, Story Telling Costumes, World Book Day Costumes, Halloween Costumes, Kids Halloween Costumes, Bridesmaid Dresses, Flower Girl Dresses, T-shirts for Children, Childrens Disney Costumes, Kids Disney Costumes,');



    Please can anyone see what is going wrong here - I have spent hours trying to fix this.

    Thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Desperately need help on this please

    Even though you've provided plenty of information, it would be a lot easier for us to see the problem (and increase your chances of a solution) if you provide a link to your site.

  3. #3
    Join Date
    Feb 2008
    Posts
    207
    Plugin Contributions
    0

    Default Re: Desperately need help on this please

    Thanks, my site is

    www.fairytalefashions.co.uk

  4. #4
    Join Date
    May 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Desperately need help on this please

    Hey karenkte,

    I'm no expert, but upgrading to 1.3.8a might do the trick.

    In my /includes/languages/english/YOURTEMPLATE/meta_tags.php you will find this code:

    Code:
    // Home Page Only:
      define('HOME_PAGE_META_DESCRIPTION', '');
      define('HOME_PAGE_META_KEYWORDS', '');
    I had no issues with simply filling in the home page description field.

    Perhaps this was added in 1.3.8. To be sure, search for 'HOME_PAGE_META_DESCRIPTION' in your Admin/Tools/Developers Tool Kit.

    If you are not interested in the upgrade, the code in /includes/modules/YOURTEMPLATE/meta_tags.php looks like this:

    Code:
    case ($this_is_home_page):
      define('META_TAG_TITLE', (HOME_PAGE_TITLE != '' ? HOME_PAGE_TITLE : (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE));
      define('META_TAG_DESCRIPTION', (HOME_PAGE_META_DESCRIPTION != '') ? HOME_PAGE_META_DESCRIPTION : TITLE . PRIMARY_SECTION . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', (HOME_PAGE_META_KEYWORDS != '') ? HOME_PAGE_META_KEYWORDS : KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) );
      break;
    Hope that helps!

    - Paul

  5. #5
    Join Date
    Feb 2008
    Posts
    207
    Plugin Contributions
    0

    Default Re: Desperately need help on this please

    Thanks for this.....I don't want to upgrade just yet so I've tried what you suggest for 1.3.7 and i still cant get this to work.

    I would be very grateful if anyone knows how to sort this out!

    Thanks

  6. #6
    Join Date
    May 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Desperately need help on this please

    Just curious:

    Did you remove all previous meta tag overrides when attempting my suggestion?

    If not, try that. Otherwise, I don't know.

    Sorry, and good luck.

    - Paul

  7. #7
    Join Date
    Feb 2008
    Posts
    207
    Plugin Contributions
    0

    Default Re: Desperately need help on this please

    Paul,

    Yes I did remove these.

    Just tried it all again from scratch and still can't get it to work.

    I suppose really I should upgrade but I am afraid that I will mess up something else if I do this......having taught myself everything on zencart from scratch I am sure this would not go smoothly and then I would have the headache of putting it right!! Believe me I am not technical at all and still amaze myself that I've managed to get my site this far just with the help of forums.

    I would rather be able to find a solution to this from the forum because I think you only learn when you do something yourself. But I may have to pay my hosting company to sort this one out for me I think.

    Thanks for trying to help though....I appreciate it.

    Karen

 

 

Similar Threads

  1. Desperately need e-mail help!
    By doktorfroyd in forum General Questions
    Replies: 1
    Last Post: 21 Jan 2011, 02:19 PM
  2. desperately seeking need help
    By PinkLeopard in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Oct 2010, 04:06 AM
  3. Desperately need help:(
    By runoka in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 21 May 2008, 04:57 AM
  4. Desperately need help upgrading PLEASE
    By pwdesign in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 21 Nov 2006, 11:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR