Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 54
  1. #21
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Here's a post I found that seems to have worked for my site.

    The file I modified with the following info is located at:

    /includes/templates/your_custom_template/common/html_header.php

    I'm using version 1.3.8

    PHP Code:
     Originally Posted by www.scifi-models.com
    Hi there... I have an easy answer for everyone on this...


    Search for this line in your_template/common/html_header.php..

    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />

    Should be near the top, line 27.

    Delete the line and replace with the following:

    <?php $slashpos strrpos($_SERVER['REQUEST_URI'],"/");
    if (
    $slashpos === false || $slashpos == strlen($_SERVER['REQUEST_URI'])) {
    $thispage $_SERVER['REQUEST_URI'];
    }
    else
    {
    $thispage substr($_SERVER['REQUEST_URI'],$slashpos+1,strlen($_SERVER['REQUEST_URI'])-1);
    }
    if (
    $thispage == "index.php" || $thispage == "index.php?main_page=index" || $thispage == "") {
    echo 
    '<meta name="keywords" content="scifi models,star trek resin props,star trek models,movie memorabilia,t-virus prop,enterprise prop,maco,############## movie props,prop reproductions,resin props,battlestar resin prop"/>';
    }
    else
    {
    echo 
    '<meta name="keywords" content="' META_TAG_KEYWORDS '" />' ;
    ?>



    This will replace the dynamic keywords it generates automatically words to a set keywords for the main index.php page, and send the dynamic keywords for products. Hope this helps! Thanks to synavia for her code for checking which page your on!
    Hope this helps.

    Zencart ROCKS!
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

  2. #22
    Join Date
    Jun 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Right, i think thats the thread i refered to in my previous posting. However this will fix your "keyword content" tags and if you change the other code also your "description' tag.

    However this works only for the main page, if you check on your products and view the source, zen still spams these pages. You can influence that a bit by defining meta tags in your admin but that does not stop Zen from putting in the keywords.

    Also i have no idea how to define tags for EZ-pages.. ???

  3. #23
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Thanks kdnmiller, and yes i saw your post(#19) with the link but when i clicked it, it went to something about 'auto email generation' so i did a search under posts done by your username and that's how i found the right thread and decided to include the info in my post (#21) in case anyone else had the same problem

    And for whatever reason, the above 'fix' actually stopped spamming both my home page AND my product meta tags (that is, the ones that I've had time to update with the biohazard link)

    So hopefully these posts will help others and maybe one of us will figure out why it's not stopping the product meta tag spamming on your site, too. If i find any additional solutions i'll post them back here, too.

    Have a great weekend and thanks again!

    Zencart ROCKS!
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

  4. #24
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    62
    Plugin Contributions
    1

    Default Re: Automatic Meta tags generation

    Hey guys -
    I wanted to have a little more over which categories show up in the meta tag keywords, so I coded a mod which basically adds a checkbox in the admin asking whether the category should be included in site wide keywords. Note that the keywords will still show on the category pages, but now not on the home page or other pages, such as the contact page.

    I hope this helps some of you. If anyone tries it and has any questions let me know. I am thinking of expanding on this mod, adding more control over meta tags, especially for ez pages. Any suggestions?

    The link below is the original post with the code for the mod.
    zen-cart.com/forum/showpost.php?p=534671&postcount=5

  5. #25
    Join Date
    May 2007
    Location
    Port Charlotte, FL
    Posts
    125
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Good morning. I am attempting to change the meta information on the home page ONLY.
    In meta_tag.php there is a section that is supposed to allow me to do this:
    // Home Page Only:
    define('HOME_PAGE_META_DESCRIPTION', ' ');
    define('HOME_PAGE_META_KEYWORDS', ' ');

    I am using a custom template called "aaadisplay". I have entered the updated information in
    /includes/languages/english/aaadisplay/meta_tag.php
    but still just get the category info

    I also entered the updated information in
    /includes/languages/english/meta_tag.php
    in the event that the override was not functioning but stll no change.

    Any ideas?
    H. Light
    Florida

  6. #26
    Join Date
    Jun 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Hi, i myself have one site that also has this code in meta-tag.php and it worked for me. I did not needed to go through the whole process described above, and the tags were changed on the mainpage..

    Make sure you are editing the correct meta-tag.php, there may be more than one.. mine is located at /includes/languages/english/meta_tag.php and not /includes/languages/english/myzenshop/meta_tag.php as you stated.

    I left SITE TAGLINE and CUSTOM KEYWORDS blank and only used the HOME_PAGE_META sections... also have defined product meta tags in your admin.

    If this all still does not work you can still edit /includes/templates/your_custom_template/common/html_header.php

    cheers
    mike

  7. #27
    Join Date
    May 2007
    Location
    Port Charlotte, FL
    Posts
    125
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    Thanks for taking the time to respond.
    I made the changes in both locations just in case and neither seem to do a darn thing. Bummer!
    H. Light
    Florida

  8. #28
    Join Date
    Jun 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    You mean you changed both files: meta_tags.php AND html_header.php ??

    again are you sure you are editing the correct meta tag file?? make change to the title tag in the file and use source code to check if it was changed..

  9. #29
    Join Date
    May 2007
    Location
    Port Charlotte, FL
    Posts
    125
    Plugin Contributions
    0

    Default Re: Automatic Meta tags generation

    I did not edit html_header.php.
    I edited both copies of meta_tags.php. One in my template directory /includes/languages/english/aaadisplay and one in /includes/languages/english in the event it was not looking in the correct directory.

    I could not figure out what to edit html_header.php. There did not seem to be anything there that was specific to the home page and I did not want to make a global change. I hope you can understand what I am attempting to explain.

    Is this function a part of version 1.3.8? I am running 1.3.7. I have searched for the string "home_page_meta" and do not find it in any other file on my system. So I wonder what good is ther variable if it is not used elsewhere?

    Thanks again for trying to help me.
    H. Light
    Florida

  10. #30
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Automatic Meta tags generation

    Custom meta-tags for just the home page was a feature added in v1.3.8.
    You won't find that option in v1.3.7 or earlier.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. v151 Automatic Random Code Generation for a product?
    By Rick5150 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 10 Jun 2013, 09:40 PM
  2. 1st discount coupon automatic generation ?
    By hubert in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 21 Nov 2008, 05:44 PM

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