Results 1 to 4 of 4
  1. #1

    Default Problems after editing metatags on home page

    I tried the link in this thread and did what was instructed and it left my site blank. I had to remove everything to like it was before. Now I am left with less than what I started with.

    I had already edited my meta tags keywords for my home page. The rest was set to default so that it would read the meta tags that I had set up in admin.

    I wanted to change my keywords. I noticed that when I went to my site and viewed source, my keywords didn't have commas in between. I wanted to add them as well as more keywords. I couldn't find that same page that I was viewing when I looked at the view source page.

    Now with trying to use that link above, it blanked my screen. I just erased what I did but now I have no keywords listed when under view source.

    I take it that with the upgrade to 8 that I won't have to worry about this problem or will I be able to find these files more easily? I am wanting to upgrade...I just can't figure it out. I had someone else set me up just to get me live and I have been learning how to add products and things like that. I can not figure out how to upgrade and change templates. Is upgrading the only way for me to add the meta tag keywords for my home page?
    [FONT=Microsoft Sans Serif]Personalized 2 Perfection[/FONT]
    http://personalized2perfection.net
    Your one stop shop for unique personalized gifts!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Meta tags - home page

    FAQ discussing how to troubleshoot blank-page problems:
    https://www.zen-cart.com/tutorials/index.php?article=82
    .

    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.

  3. #3

    Default Re: Meta tags - home page

    After searching & not finding, here I am:
    I changed the meta tag file in includes/languages/english: nothing.
    I added the meta tag keywords here but when I looked at the site live; page went blank;something about long string of text. I went in and deleted most of it. Site came back, but nothing that I inputed is showing when you view source.Here is the file as is now:
    Code:
     * @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', 'Unique Personalized Gifts, Custom Apparel Printing');
    
    // Site Tagline
    define('SITE_TAGLINE', '');
    
    // Custom Keywords
    define('CUSTOM_KEYWORDS', 'Unique Personalized Gifts, Custom T-Shirt Printing, Personalized Gifts for Kids');
    
    // Review Page can have a lead in:
    define('META_TAGS_REVIEW', 'Reviews: ');
    
    // separators for meta tag definitions
    // Define Primary Section Output
      define('PRIMARY_SECTION', ' : ');
    
    // Define Secondary Section Output
      define('SECONDARY_SECTION', ' - ');
    
    // Define Tertiary Section Output
      define('TERTIARY_SECTION', ', ');
    
    // Define divider ... usually just a space or a comma plus a space
      define('METATAGS_DIVIDER', ' ');
    
    // Define which pages to tell robots/spiders not to index
    // This is generally used for account-management pages or typical SSL pages, and usually doesn't need to be touched.
      define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,account,account_edit,account_history,account_history_info,account_newsletters,account_notifications,account_password,address_book,advanced_search,advanced_search_result,checkout_success,checkout_process,checkout_shipping,checkout_payment,checkout_confirmation,cookie_usage,create_account_success,contact_us,download,download_timeout,customers_authorization,down_for_maintenance,password_forgotten,time_out,unsubscribe');
    
    
    // favicon setting
    // There is usually NO need to enable this unless you wish to specify a path and/or a different filename
     define('FAVICON','favicon.ico');
    
    ?>
    I have checked file in includes languages/english/my_template:
    only one file there which is header.php. Is this correct?

    I checked includes/modules & includes/modules/my_template:
    nothing of what I see when I to to view source in Firefox. Here is the file:
    Code:
    <?php
    /**
     * meta_tags module
     *
     * @package modules
     * @copyright Copyright 2003-2006 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 4960 2006-11-20 01:46:46Z drbyte $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_MODULE_START_META_TAGS');
    
    
    /////////////////////////////////////////////////////////
    // Moved to /includes/languages/english/meta_tags.php
    //
    // Define Primary Section Output
    //  define('PRIMARY_SECTION', ' : ');
    
    // Define Secondary Section Output
    //  define('SECONDARY_SECTION', ' - ');
    
    // Define Tertiary Section Output
    //  define('TERTIARY_SECTION', ', ');
    
    //
    /////////////////////////////////////////////////////////
    
    // Add tertiary section to site tagline
    if (strlen(SITE_TAGLINE) > 1) {
      define('TAGLINE', TERTIARY_SECTION . SITE_TAGLINE);
    } else {
      define('TAGLINE', '');
    }
    
    $review_on = "";
    $keywords_string_metatags = "";
    $meta_tags_over_ride = false;
    if (!defined('METATAGS_DIVIDER')) define('METATAGS_DIVIDER', ' ');
    
    // Get all top category names for use with web site keywords
    $sql = "select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status=1";
    $keywords_metatags = $db->Execute($sql);
    while (!$keywords_metatags->EOF) {
      $keywords_string_metatags .= $keywords_metatags->fields['categories_name'] . METATAGS_DIVIDER;
      $keywords_metatags->MoveNext();
    }
    define('KEYWORDS', str_replace('"','',zen_clean_html($keywords_string_metatags) . CUSTOM_KEYWORDS));
    
    // Get different meta tag values depending on main_page values
    switch ($_GET['main_page']) {
      case 'advanced_search':
      case 'account_edit':
      case 'account_history':
      case 'account_history_info':
      case 'account_newsletters':
      case 'account_notifications':
      case 'account_password':
      case 'address_book':
      define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_1);
      break;
    
      case 'address_book_process':
      define('META_TAG_TITLE', NAVBAR_TITLE_ADD_ENTRY . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_ADD_ENTRY . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_ADD_ENTRY);
      break;
    
      case 'advanced_search_result':
      case 'password_forgotten':
      define('META_TAG_TITLE', NAVBAR_TITLE_2 . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_2 . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_2);
      break;
    
      case 'checkout_confirmation':
      case 'checkout_payment':
      case 'checkout_payment_address':
      case 'checkout_shipping':
      case 'checkout_success':
      case 'create_account_success':
      define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . HEADING_TITLE);
      break;
    
      case 'index':
      // bof: categories meta tags
      // run custom categories meta tags
      $sql = "select * from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . " mcd where mcd.categories_id = '" . (int)$current_category_id . "' and mcd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
      $category_metatags = $db->Execute($sql);
      if (!$category_metatags->EOF) {
        define('META_TAG_TITLE', str_replace('"','',$category_metatags->fields['metatags_title']));
        define('META_TAG_DESCRIPTION', str_replace('"','',$category_metatags->fields['metatags_description']));
        define('META_TAG_KEYWORDS', str_replace('"','',$category_metatags->fields['metatags_keywords']));
      } else {
        // build categories meta tags
        // eof: categories meta tags
        if ($category_depth == 'nested') {
          $sql = "select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' and c.categories_status=1";
          $category_metatags = $db->Execute($sql);
          if ($category_metatags->EOF) {
            $meta_tags_over_ride = true;
          } else {
            define('META_TAG_TITLE', str_replace('"','',$category_metatags->fields['categories_name'] . PRIMARY_SECTION . TITLE . TAGLINE));
            define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . $category_metatags->fields['categories_name'] . SECONDARY_SECTION . KEYWORDS));
            define('META_TAG_KEYWORDS', str_replace('"','',KEYWORDS . METATAGS_DIVIDER . $category_metatags->fields['categories_name']));
          } // EOF
        } elseif ($category_depth == 'products') {
          if (isset($_GET['manufacturers_id']) || ((isset($_GET['filter_id']) && $_GET['filter_id'] > 0) && isset($_GET['cPath'])) ) {
            if ((isset($_GET['filter_id']) && isset($_GET['cPath'])) ) {
              $include_manufacturers_id = $_GET['filter_id'];
            } else {
              $include_manufacturers_id = $_GET['manufacturers_id'];
            }
            $sql = "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$include_manufacturers_id . "'";
            $manufacturer_metatags = $db->Execute($sql);
            if ($manufacturer_metatags->EOF) {
              $meta_tags_over_ride = true;
            } else {
              define('META_TAG_TITLE', str_replace('"','',$manufacturer_metatags->fields['manufacturers_name'] . PRIMARY_SECTION . TITLE . TAGLINE));
              define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . $manufacturer_metatags->fields['manufacturers_name'] . SECONDARY_SECTION . KEYWORDS));
              define('META_TAG_KEYWORDS', str_replace('"','', $manufacturer_metatags->fields['manufacturers_name'] . METATAGS_DIVIDER . KEYWORDS));
            } // EOF
          } else {
            $sql = "select cd.categories_name from " . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' and c.categories_status=1";
            $category_metatags = $db->Execute($sql);
            if ($category_metatags->EOF) {
              $meta_tags_over_ride = true;
            } else {
              define('META_TAG_TITLE', str_replace('"','',$category_metatags->fields['categories_name'] . PRIMARY_SECTION . TITLE . TAGLINE));
              define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . $category_metatags->fields['categories_name'] . SECONDARY_SECTION . KEYWORDS));
              define('META_TAG_KEYWORDS', str_replace('"','',KEYWORDS . METATAGS_DIVIDER . $category_metatags->fields['categories_name']));
            } // EOF
          }
        } else {
          if (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', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
              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));
              define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . $manufacturer_metatags->fields['manufacturers_name'] . SECONDARY_SECTION . KEYWORDS));
              define('META_TAG_KEYWORDS', str_replace('"','', $manufacturer_metatags->fields['manufacturers_name'] . METATAGS_DIVIDER . KEYWORDS));
            }
          } else {
            // nothing custom main page
            $meta_tags_over_ride = true;
          }
        }
      } // custom meta tags
      break;
      // eof: categories meta tags
    
      case 'popup_image':
      $meta_products_name = str_replace('"','',zen_clean_html($products_values->fields['products_name']));
      define('META_TAG_TITLE', $meta_products_name . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $meta_products_name . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . $meta_products_name);
      break;
    
      case 'popup_image_additional':
      $meta_products_name = str_replace('"','',zen_clean_html($products_values->fields['products_name']));
      define('META_TAG_TITLE', $meta_products_name . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . $meta_products_name . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . $meta_products_name);
      break;
    
      case 'popup_search_help':
      define('META_TAG_TITLE', HEADING_SEARCH_HELP . PRIMARY_SECTION . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_SEARCH_HELP . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . HEADING_SEARCH_HELP);
      break;
    
      // unless otherwise required product_reviews uses the same settings as product_reviews_info and other _info pages
      case 'product_reviews':
      // unless otherwise required product_reviews_info uses the same settings as reviews and other _info pages
      case 'product_reviews_info':
      $review_on = META_TAGS_REVIEW;
      //  case 'product_info':
      case (strstr($_GET['main_page'], 'product_') or strstr($_GET['main_page'], 'document_')):
      /*
      $sql = "select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_price, p.products_tax_class_id, p.product_is_free, p.products_price_sorter,
      p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status, p.metatags_price_status, p.metatags_title_tagline_status,
      mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd where p.products_status = 1 and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and mtpd.products_id = p.products_id and mtpd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
      */
    
      $sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id,
                                          p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,
                                          p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,
                                          pd.products_description, p.product_is_free,
                                          mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
                                  from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd on mtpd.products_id = p.products_id and mtpd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                  where p.products_id = '" . (int)$_GET['products_id'] . "'
                                  and p.products_id = pd.products_id
                                  and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    
      $product_info_metatags = $db->Execute($sql);
      if ($product_info_metatags->EOF) {
        $meta_tags_over_ride = true;
      } else {
        // custom meta tags per product
        if (!empty($product_info_metatags->fields['metatags_keywords']) or !empty($product_info_metatags->fields['metatags_description'])) {
          $meta_products_name = '';
          $meta_products_price = '';
          $metatags_keywords = '';
    
          $meta_products_price = ($product_info_metatags->fields['metatags_price_status'] == '1' ? SECONDARY_SECTION . ($product_info_metatags->fields['products_price_sorter'] > 0 ? $currencies->display_price($product_info_metatags->fields['products_price_sorter'], zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id'])) : SECONDARY_SECTION . META_TAG_PRODUCTS_PRICE_IS_FREE_TEXT) : '');
    
          $meta_products_name .= ($product_info_metatags->fields['metatags_products_name_status'] == '1' ? $product_info_metatags->fields['products_name'] : '');
          $meta_products_name .= ($product_info_metatags->fields['metatags_title_status'] == '1' ? ' ' . $product_info_metatags->fields['metatags_title'] : '');
          $meta_products_name .= ($product_info_metatags->fields['metatags_model_status'] == '1' ? ' [' . $product_info_metatags->fields['products_model'] . ']' : '');
          if (zen_check_show_prices() == true) {
            $meta_products_name .= $meta_products_price;
          }
          $meta_products_name .= ($product_info_metatags->fields['metatags_title_tagline_status'] == '1' ? PRIMARY_SECTION . TITLE . TAGLINE : '');
    
          if (!empty($product_info_metatags->fields['metatags_description'])) {
            // use custom description
            $metatags_description = $product_info_metatags->fields['metatags_description'];
          } else {
            // no custom description defined use product_description
            $metatags_description = zen_truncate_paragraph(strip_tags(stripslashes($product_info_metatags->fields['products_description'])), MAX_META_TAG_DESCRIPTION_LENGTH);
          }
    
          $metatags_description = zen_clean_html($metatags_description);
    
          if (!empty($product_info_metatags->fields['metatags_keywords'])) {
            // use custom keywords
            $metatags_keywords = $product_info_metatags->fields['metatags_keywords'] . METATAGS_DIVIDER . CUSTOM_KEYWORDS;  // CUSTOM skips categories
          } else {
            // no custom keywords defined use product_description
            $metatags_keywords = KEYWORDS . METATAGS_DIVIDER . $meta_products_name . METATAGS_DIVIDER;
          }
    
          define('META_TAG_TITLE', str_replace('"','',$review_on . $meta_products_name));
          define('META_TAG_DESCRIPTION', str_replace('"','',$metatags_description . ' '));
          define('META_TAG_KEYWORDS', str_replace('"','',$metatags_keywords));  // KEYWORDS and CUSTOM_KEYWORDS are added above
    
        } else {
          // build un-customized meta tag
          if (META_TAG_INCLUDE_PRICE == '1' and !strstr($_GET['main_page'], 'document_general')) {
            if ($product_info_metatags->fields['product_is_free'] != '1') {
              if (zen_check_show_prices() == true) {
                $meta_products_price = zen_get_products_actual_price($product_info_metatags->fields['products_id']);
                $meta_products_price = SECONDARY_SECTION . $currencies->display_price($meta_products_price, zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id']));
              }
            } else {
              $meta_products_price = SECONDARY_SECTION . META_TAG_PRODUCTS_PRICE_IS_FREE_TEXT;
            }
          } else {
            $meta_products_price = '';
          }
    
          if (META_TAG_INCLUDE_MODEL == '1' && zen_not_null($product_info_metatags->fields['products_model'])) {
            $meta_products_name = $product_info_metatags->fields['products_name'] . ' [' . $product_info_metatags->fields['products_model'] . ']';
          } else {
            $meta_products_name = $product_info_metatags->fields['products_name'];
          }
          $meta_products_name = zen_clean_html($meta_products_name);
    
          $products_description = zen_truncate_paragraph(strip_tags(stripslashes($product_info_metatags->fields['products_description'])), MAX_META_TAG_DESCRIPTION_LENGTH);
    
          $products_description = zen_clean_html($products_description);
    
          define('META_TAG_TITLE', str_replace('"','',$review_on . $meta_products_name . $meta_products_price . PRIMARY_SECTION . TITLE . TAGLINE));
          define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . ' ' . $meta_products_name . SECONDARY_SECTION . $products_description . ' '));
          define('META_TAG_KEYWORDS', str_replace('"','',$meta_products_name . METATAGS_DIVIDER . KEYWORDS));
    
        } // CUSTOM META TAGS
      } // EOF
      break;
    
      case 'product_reviews_info_OFF':
      $sql = "select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_model, pd.products_name, p.product_is_free from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "' and r.products_id = p.products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = '". (int)$_SESSION['languages_id'] . "'";
      $review_metatags = $db->Execute($sql);
      if ($review_metatags->EOF) {
        $meta_tags_over_ride = true;
      } else {
        if (META_TAG_INCLUDE_PRICE == '1') {
          if ($review_metatags->fields['product_is_free'] != '1') {
            $meta_products_price = zen_get_products_actual_price($review_metatags->fields['products_id']);
            $meta_products_price = SECONDARY_SECTION . $currencies->display_price($meta_products_price, zen_get_tax_rate($review_metatags->fields['products_tax_class_id']));
          } else {
            $meta_products_price = SECONDARY_SECTION . META_TAG_PRODUCTS_PRICE_IS_FREE_TEXT;
          }
        } else {
          $meta_products_price = '';
        }
    
        if (zen_not_null($review_metatags->fields['products_model'])) {
          $meta_products_name = $review_metatags->fields['products_name'] . ' [' . $review_metatags->fields['products_model'] . ']';
        } else {
          $meta_products_name = $review_metatags->fields['products_name'];
        }
    
        $meta_products_name = zen_clean_html($meta_products_name);
    
        $review_text_metatags = substr(strip_tags(stripslashes($review_metatags->fields['reviews_text'])), 0, 60);
        $reviews_rating_metatags = SUB_TITLE_RATING . ' ' . sprintf(TEXT_OF_5_STARS, $review_metatags->fields['reviews_rating']);
        define('META_TAG_TITLE', str_replace('"','',$meta_products_name . $meta_products_price . PRIMARY_SECTION . TITLE . TERTIARY_SECTION . NAVBAR_TITLE));
        define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . NAVBAR_TITLE . SECONDARY_SECTION . $meta_products_name . SECONDARY_SECTION . $review_metatags->fields['customers_name'] . SECONDARY_SECTION . $review_text_metatags . ' ' . SECONDARY_SECTION . $reviews_rating_metatags));
        define('META_TAG_KEYWORDS', str_replace('"','',KEYWORDS . METATAGS_DIVIDER . $meta_products_name . METATAGS_DIVIDER . $review_metatags->fields['customers_name'] . METATAGS_DIVIDER . $reviews_rating_metatags));
      } // EOF
      break;
    
      default:
      define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) );
    }
    
    // meta tags override due to 404, missing products_id, cPath or other EOF issues
    if ($meta_tags_over_ride == true) {
      define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
      define('META_TAG_DESCRIPTION', TITLE . (defined('NAVBAR_TITLE') ? PRIMARY_SECTION . NAVBAR_TITLE : '') . SECONDARY_SECTION . KEYWORDS);
      define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : ''));
    }
    
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_MODULE_END_META_TAGS');
    ?>
    [FONT=Microsoft Sans Serif]Personalized 2 Perfection[/FONT]
    http://personalized2perfection.net
    Your one stop shop for unique personalized gifts!

  4. #4

    Default Re: Meta tags - home page

    This is what the view source looks like from my home page.This is what I would like to edit so that I can have description and keywords;I only want it for my home page only:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head>
    <title>Unique Personalized Gifts, Custom Apparel Printing</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="keywords" content="HOME_PAGE_META_KEYWORDS" />
    <meta name="description" content="HOME_PAGE_META_DESCRIPTION" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen Cart&trade; Team and others" />
    <meta name="generator" content="shopping cart program by Zen Cart&trade;, [url]http://www.zen-cart.com[/url] eCommerce" />
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    
    <base href="http://personalized2perfection.net/" />
    
    <link rel="stylesheet" type="text/css" href="includes/templates/cherry_zen/css/stylesheet.css" />
    <link rel="stylesheet" type="text/css" href="includes/templates/cherry_zen/css/stylesheet_dotline.css" />
    <link rel="stylesheet" type="text/css" href="includes/templates/cherry_zen/css/stylesheet_dropshadow.css" />
    </head>
    
    <body id="indexHomeBody">
    
    <!--bof-header logo and navigation display-->
    <!-- divs for drop shadow -->
    <div id="nw"><div id="ne"><div id="se"><div id="sw"><div id="n"><div id="s"><div id="w"><div id="e"><div id="main"><table id="workaround"><tr><td>
       <div id="headerWrapper">
          <!--bof-navigation display-->
          <div id="navMainWrapper">
            <div id="navMainSearch">
    <form name="quick_find_header" action="http://personalized2perfection.net/index.php?main_page=advanced_search_result" method="get"><input type="hidden" name="main_page" value="advanced_search_result" /><input type="hidden" name="search_in_description" value="1" /><input type="search" name="keyword" id="searchTop" size="20" maxlength="30" value="Search" onfocus="if (this.value == 'Search') this.value = '';" onblur="if (this.value == '') this.value = 'Search';" /></form> </div>
            <div id="navMain">
              <ul>
                <li><a href="http://personalized2perfection.net/"><span>Home</span></a></li>
    <li><a href="http://personalized2perfection.net/index.php?main_page=login"><span>Log In</span></a></li>
    <li><a href="http://personalized2perfection.net/index.php?main_page=account"><span>My Account</span></a></li>
    <li><a href="http://personalized2perfection.net/index.php?main_page=shopping_cart"><span>Shopping Cart</span></a></li>
    <li><a href="http://personalized2perfection.net/index.php?main_page=checkout_shipping"><span class="last">Checkout</span></a></li>
              </ul>
            </div>
          </div>
          <!--eof-navigation display-->
          <!--bof-branding display-->
          <div id="logoWrapper" class="clearfix">
    <div id="logo"><a href="http://personalized2perfection.net/"><img src="includes/templates/cherry_zen/images/logo.gif" alt="Your one stop shop for unique personalized gifts!" title=" Your one stop shop for unique personalized gifts! " width="900" height="100" /></a></div>
                  </div>
          <!--eof-branding display-->
          <!--eof-header logo and navigation display-->
          <!--bof-optional categories tabs navigation display-->
          <div id="navCatTabsWrapper">
    <div id="navCatTabs">
    <ul>
    <li><a class="category-top" href="http://personalized2perfection.net/index.php?main_page=index&amp;cPath=93">Scrabooking Services</a> </li>
    <li><a class="category-top" href="http://personalized2perfection.net/index.php?main_page=index&amp;cPath=64">Custom Apparel Printing</a> </li>
    <li><a class="category-top" href="http://personalized2perfection.net/index.php?main_page=index&amp;cPath=1">Personalized Photo Gifts</a> </li>
    <li><a class="category-top" href="http://personalized2perfection.net/index.php?main_page=index&amp;cPath=61">Personalized Gifts for Kids</a> </li>
    <li><a class="category-top" href="http://personalized2perfection.net/index.php?main_page=index&amp;cPath=23">Unique Personalized Gifts</a> </li>
    </ul>
    </div>
    
    
    </div>
    I did not copy all of the view source...just enough to show what I want to edit and give you an idea of what page I am looking for.


    I know I need to upgrade. I am looking for someone to do it for me as I am totally confused on doing it myself. But like I mentioned; I had corrected this problem before. I have no idea why it is like this. I tried to find this same file to add more keywords and have been having troubles since. I now show nothing instead of the few that I had a couple weeks ago. Can someone please assist me?
    [FONT=Microsoft Sans Serif]Personalized 2 Perfection[/FONT]
    http://personalized2perfection.net
    Your one stop shop for unique personalized gifts!

 

 

Similar Threads

  1. Site gone down after editing the metatags.
    By ALT3RNAT1V3 in forum General Questions
    Replies: 3
    Last Post: 28 Jul 2012, 03:18 PM
  2. v139f Editing metatags
    By wantonwax in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Feb 2012, 03:10 PM
  3. Editing home page
    By brewstec in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 20 Feb 2011, 03:47 PM
  4. Blank zen cart after editing home page
    By danielledove in forum General Questions
    Replies: 2
    Last Post: 23 Nov 2009, 07:39 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