Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / title bar... last question

title bar... last question

Locked

Views: 3,517

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
17 Jan 2007, 12:35 PM
#1
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

title bar... last question

I have edited the title bar but I would also like to edit that which preceeds : My Site :: Tag Line - Windows Inernet Explorer.
For example, if I am on a product page it shows as > Product Name - $10.00 : The Store Name :: The Tag Line - Windows Inernet Explorer I want to remove the reference to the price.
Thanks in advance

17 Jan 2007, 2:22 PM
#2
ginginca avatar

ginginca

Zen Follower

Join Date:
Oct 2006
Posts:
129
Plugin Contributions:
1

Re: title bar... last question

This is handled in the CATALOG module.

Drill into the product that you want to edit that tag for and on the right there's a little image (the last one) that will take you to the Meta Tags for that product. Each element can be turned on or off.

You can control each product individually.

Personally I would do this on a spreadsheet of the data, and then import it into PHPMYADMIN.

17 Jan 2007, 2:52 PM
#3
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

Re: title bar... last question

ginginca:

You can control each product individually.
Are you in turn saying that it isn't a global setting?
Thx

17 Jan 2007, 4:39 PM
#4
ginginca avatar

ginginca

Zen Follower

Join Date:
Oct 2006
Posts:
129
Plugin Contributions:
1

Re: title bar... last question

I've never went about it that way so I don't know.

I usually want to control the meta tags individually anyway. So sorry I don't the answer to that. I'm not aware of a way to do it globally.

17 Jan 2007, 4:50 PM
#5
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

Re: title bar... last question

Thanks, maybe someone else will read this post and know. I cannot find any way of doing so thus far.

17 Jan 2007, 5:20 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: title bar... last question

There is a global setting in the Configuration ... Product Info ... to turn off the Price in the meta tag title for products that are not customized ...

Meta Tags - Include Product Price in Title
Do you want to include the Product Price in the Meta Tag Title?

0= off 1= on

17 Jan 2007, 6:16 PM
#7
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

Re: title bar... last question

Thanks Linda... ****

I was trying to find the reference in Dreamweaver... never thought of searching in the admin module... that would be way to simple... duh

17 Jan 2007, 6:18 PM
#8
ginginca avatar

ginginca

Zen Follower

Join Date:
Oct 2006
Posts:
129
Plugin Contributions:
1

Re: title bar... last question

Linda,

Won't that do it for everything?

I thought cspsgl was looking for a global setting for only when there is a 'CALL FOR PRICE" ??

Gin

17 Jan 2007, 6:20 PM
#9
ginginca avatar

ginginca

Zen Follower

Join Date:
Oct 2006
Posts:
129
Plugin Contributions:
1

Re: title bar... last question

cspsgl:

I was trying to find the reference in Dreamweaver.

If you haven't found it yet, the Developer's Tool Kit in the admin panel is very helpful to find lines of code.

17 Jan 2007, 6:34 PM
#10
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

Re: title bar... last question

Never thought of that either... I must admit that I am very comfy with searching and adjusting code in DW and tend to work my way through most issues there.

I am also editing the text on the Gift Certificates FAQ page and Discount Coupons page but have not been able to locate the code to remove (hide) the "look up" form on either page.

Still accepting hints gratefully...

19 Jan 2007, 8:17 PM
#11
cregy avatar

cregy

New Zenner

Join Date:
Oct 2006
Location:
Lostwithiel, Cornwall
Posts:
69
Plugin Contributions:
0

Re: title bar... last question

Hi

cspsgl:

I have edited the title bar

Can you tell me how you did this please?

Thanks

Rich

19 Jan 2007, 8:29 PM
#12
cregy avatar

cregy

New Zenner

Join Date:
Oct 2006
Location:
Lostwithiel, Cornwall
Posts:
69
Plugin Contributions:
0

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

18 Oct 2007, 6:02 AM
#13
phycel avatar

phycel

New Zenner

Join Date:
Sep 2007
Location:
Daytona Beach, Florida
Posts:
21
Plugin Contributions:
0

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?

18 Oct 2007, 10:00 AM
#14
cspsgl avatar

cspsgl

New Zenner

Join Date:
Feb 2006
Location:
Malagash, Nova Scotia
Posts:
16
Plugin Contributions:
0

Re: title bar... last question

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

// 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

18 Oct 2007, 1:40 PM
#15
phycel avatar

phycel

New Zenner

Join Date:
Sep 2007
Location:
Daytona Beach, Florida
Posts:
21
Plugin Contributions:
0

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.

18 Oct 2007, 3:41 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: title bar... last question

phycel:

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?

phycel:

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:```
// 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;

18 Oct 2007, 3:53 PM
#17
phycel avatar

phycel

New Zenner

Join Date:
Sep 2007
Location:
Daytona Beach, Florida
Posts:
21
Plugin Contributions:
0

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!

25 Dec 2007, 10:12 PM
#18
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

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.

25 Dec 2007, 10:22 PM
#19
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

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: '

25 Dec 2007, 10:51 PM
#20
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

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?