Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    Oct 2006
    Location
    Lostwithiel, Cornwall
    Posts
    69
    Plugin Contributions
    0

    Default Re: title bar... last question

    Hi

    Quote Originally Posted by cspsgl View Post
    I have edited the title bar

    Can you tell me how you did this please?

    Thanks

    Rich

  2. #12
    Join Date
    Oct 2006
    Location
    Lostwithiel, Cornwall
    Posts
    69
    Plugin Contributions
    0

    Default Re: title bar... last question

    Hi

    Don't worry I worked it out. For anyone else who stumbles on this thread you need to head to:
    includes - languages - english - meta_tags.php

    Don't edit that file directly though. Get a copy of it, then edit it then place it in this directory:
    includes - languages - english - Your template name (hint: you might need to create it).

    Enjoy.

    Rich

  3. #13
    Join Date
    Sep 2007
    Location
    Daytona Beach, Florida
    Posts
    21
    Plugin Contributions
    0

    Default Re: title bar... last question

    While reading these posts I am still not finding the answer to my question. When showing an individual product, the title bar shows -

    Product Name - $10.00 : The Store Name :: The Tag Line

    I easily found how to turn the price off, thanks to the help secion and these forums -- but I don't want the store name and tag line to show either. I want ONLY the product name to show on all products and categories. Any way to globally do this?

  4. #14
    Join Date
    Feb 2006
    Location
    Malagash, Nova Scotia
    Posts
    16
    Plugin Contributions
    0

    Default Re: title bar... last question

    edit the two lines in the file "includes > languages > english > meta_tags.php" as follows:

    Code:
    // page title
    define('TITLE', '');
    
    // Site Tagline
    define('SITE_TAGLINE', '');
    You must blank out the TITLE and SITE_TAGLINE defines, ie. no entry between the two single quotes.

    Do not comment out or delete the lines or the titlebar will show the words TITLE and SITE_TAGLINE

    Hope this helps

  5. #15
    Join Date
    Sep 2007
    Location
    Daytona Beach, Florida
    Posts
    21
    Plugin Contributions
    0

    Default Re: title bar... last question

    But then I won't have a title on my main page of my site. That won't be any good. I still need the title and tag line to show on the main page, but don't want it to show after each product.

    Thanks for the help.

  6. #16
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: title bar... last question

    Quote Originally Posted by phycel View Post
    While reading these posts I am still not finding the answer to my question. When showing an individual product, the title bar shows -

    Product Name - $10.00 : The Store Name :: The Tag Line

    I easily found how to turn the price off, thanks to the help secion and these forums -- but I don't want the store name and tag line to show either. I want ONLY the product name to show on all products and categories. Any way to globally do this?
    Quote Originally Posted by phycel View Post
    I still need the title and tag line to show on the main page, but don't want it to show after each product.
    I don't understand why you want to remove your branding/identity from the pages related to your site. But, you can do what you want to do.

    /includes/modules/YOUR_TEMPLATE/meta_tags.php
    take out references to TITLE and TAGLINE where you want them not to show. This is the section related to product pages:
    Code:
      // 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;
    .

    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.

  7. #17
    Join Date
    Sep 2007
    Location
    Daytona Beach, Florida
    Posts
    21
    Plugin Contributions
    0

    Default Re: title bar... last question

    Thank you very much. It's not what I want -- it's a client of mine. They seem to think that it makes the title too long for Google -- but they want the product name in the title bar. They've only had this store running for just under a month now... and since the entire site changed, of course ranking will drop for a bit. I am trying to explain to them that Google just needs to reindex the pages and their ranking will get better. So, I just do what I'm told.

    Thanks soooo much for the quick replies. This forum has truely been a lifesaver and Zen Cart is the best open source shopping cart around!

  8. #18
    Join Date
    Oct 2007
    Location
    Kentucky - USA
    Posts
    428
    Plugin Contributions
    0

    Default Re: title bar... last question

    Hello,
    A quick question: How do you do a line break in the TAGLINE. I assume that the code would be placed in Header.php:
    define('HEADER_SALES_TEXT', 'Sawhorse Jewelry Designs Unique equine themed silver jewelry');
    I tried:
    define('HEADER_SALES_TEXT', 'Sawhorse Jewelry Designs' <br /> 'Unique equine themed silver jewelry');

    But, of course it did not work in php. How is it done?

    Thanks.

  9. #19
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: title bar... last question

    define('HEADER_SALES_TEXT', 'Sawhorse Jewelry Designs' <br /> 'Unique equine themed silver jewelry');

    change to:

    define('HEADER_SALES_TEXT', 'Sawhorse Jewelry Designs<br />Unique equine themed silver jewelry');

    HTML can be put inbetween the single quotes. Of course, if you use single quotes in your HTML and/or JS then you need to escape them: \'

  10. #20
    Join Date
    Oct 2007
    Location
    Kentucky - USA
    Posts
    428
    Plugin Contributions
    0

    Default Re: title bar... last question

    Website Rob,
    Thanks - that worked well. It seems you are everwhere!!!
    Again Thanks.

    Oh, How about changing font & size for the 'Sawhorse Jewelry Designs'. I assume that I one needs to do this in the stylesheet. But how do you change just one line?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Changing the search bar title to a simple page title.
    By Skodster in forum General Questions
    Replies: 2
    Last Post: 20 Jul 2012, 08:23 PM
  2. Change Nav Bar title to Match info box title
    By RobertG in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 3 Feb 2010, 02:38 PM
  3. Odd title bar and title page behavior
    By B.OBrien in forum General Questions
    Replies: 1
    Last Post: 13 Nov 2008, 03:51 AM
  4. WIE Title bar and tab bar headings
    By Catattak in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Jun 2007, 05:36 PM
  5. Title Bar Info Question
    By zbargain in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 11 Jan 2007, 04:29 AM

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