Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / mmmm...Meta Tags - help/guidance needed

mmmm...Meta Tags - help/guidance needed

Locked

Views: 29,855

Results 61 to 80 of 89
This thread is locked. New replies are disabled.
2 Feb 2008, 2:54 PM
#61
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

mmmm...Meta Tags - help/guidance needed

rlexyd:

Thank you.

I added that code to my Meta_Tags.php in my own template, and the description is still the same as the keywords on the front page.
It did not pick up the new description which I added into the code you just gave me?

Is there anything I can do?

v1.3.7
www.nadiaclothing.com.au
\includes\templates\template_default\common\html_header.php

copy whole code and replace whole html_header.php and modify to suit. Be sure to back up.

 
<?php
/**
 * Common Template
 *
 * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
 * 
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [URL]http://www.zen-cart.com/license/2_0.txt[/URL] GNU Public License V2.0
 * @version $Id: html_header.php 4368 2006-09-03 19:31:00Z drbyte $
 */
/**
 * load the module for generating page meta-tags
 */
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]" <?php echo HTML_PARAMS; ?>>
<head>
<title><?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 'Nadia Clothing - Children’s Clothing. Girls Clothing. Boys Clothing. Women’s Clothing. Adelaide - South Australia - Shipping Worldwide';
}
else
{
echo '' . META_TAG_TITLE . '' ;
} ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?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 'Nadia Clothing - TOP QUALITY WELL KNOWN EUROPEAN CLOTHING AT REASONABLE PRICES - Children’s Clothing. Girls Clothing. Boys Clothing. Women’s Clothing. Adelaide - South Australia - Shipping Worldwide. Shop 2, 74 Commercial Road, PORT ADELAIDE. Customer Service and enquiries: (08) 8326 5557. We sell: GIRLS CARGO TOPS, GIRLS DENIM JEANS, GIRLS 3PC TRACK SUIT, GIRLS CARGO PANTS, GIRLS SINGLET WITH CARDIGAN, GIRLS STRIPED TOP, Jeans skirt with stocking, GIRLS 3/4 DENIM JEANS, GIRLS PINK LOVE TOP, GIRLS PINK & CREAM ROCK TOP, GIRLS PINK WITH POLKA DOTS HOODED TOP, RIBCORD SKIRT, TODDLER SET, SPORT GIRL TRACK SUIT, BOYS ORANGE MOTORBIKE LONGSLEEVE TOP, BOYS CARGO BROSS PANTS, BOYS WHITE LIZARD T-SHIRT, BOYS STYLISH JEANS, AND MUCH MORE';
}
else
{
echo '' . META_TAG_DESCRIPTION . '' ;
} ?>" />

<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, [URL]http://www.zen-cart.com[/URL] eCommerce" />
<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance') { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
<?php
/**
 * load all template-specific stylesheets, named like "style*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }
/**
 * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
 */
  $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
  $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
  $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
  $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet', 
                        '/' . $tmp_pagename, 
                        '/' . $_SESSION['language'] . '_' . $tmp_pagename, 
                        '/c_' . $cPath,
                        '/' . $_SESSION['language'] . '_c_' . $cPath,
                        '/m_' . $manufacturers_id,
                        '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id, 
                        '/p_' . $tmp_products_id,
                        '/' . $_SESSION['language'] . '_p_' . $tmp_products_id
                        );
  while(list ($key, $value) = each($sheets_array)) {
    //echo "<!--looking for: $value-->\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
  }
/**
 * load printer-friendly stylesheets -- named like "print*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');
  sort($directory_array);
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }
/**
 * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
  }
/**
 * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
  }
/**
 * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
  }
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($page_directory . '/' . $value); echo "\n";
  }
//DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
?>
</head>
<?php // NOTE: Blank line following is intended: ?>
 
 
 
30 Jun 2009, 1:03 PM
#62
jamie2k avatar

jamie2k

New Zenner

Join Date:
Oct 2006
Location:
Suffolk UK
Posts:
55
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Hi Folks,

Doeas anyone know of a SQL script to populate all products / categories meta tags with the names from each product and category?

So as an example i have the following

category = drinks

so the category meta tag for drinks would be "drinks"

products = product A

so the products metatag would be "product A"

i am wishing to have every category/products name to = the meta tag

I thought an sql script would do the trick, but i am useless at inner joining the two scripts needed.

please help :)

30 Jun 2009, 2:58 PM
#63
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

If the metatags_keywords and metatags_description are empty, then the meta tag per product is not going to work ...

To what end do you want to do this? What do you think you will accomplish? :unsure:

30 Jun 2009, 3:21 PM
#64
jamie2k avatar

jamie2k

New Zenner

Join Date:
Oct 2006
Location:
Suffolk UK
Posts:
55
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Hi Linda :)

I hope you're enjoying some of the lovely sunshine?

I hope to have meta tags, names & descriptions that match my products & Categories names.

This is what i believe will strengthen each page within the search engines.

At present the majaroity of my meta tags etc are empty and with over 17,000 products i simply cannot get them bespoke, so this is my only option.

Thanks for your attention :)

Jamie

PS i want the same info in each of the metatags_keywords and metatags_description

30 Jun 2009, 3:57 PM
#65
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

No sunshine today ... lots of rain ... :flex:

What do you mean by the "same info" ...

jamie2k:

PS i want the same info in each of the metatags_keywords and metatags_description

If you look at a Product now, without the custom info, what are you seeing ... and what do you want to see that is different on the meta tags?

30 Jun 2009, 4:24 PM
#66
jamie2k avatar

jamie2k

New Zenner

Join Date:
Oct 2006
Location:
Suffolk UK
Posts:
55
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Hi Linda,

Shame about the sunshine :(

I would like the name of each product, to be copied from the 'products_description'.'products_name' to the 3 meta sections

I would like the same to be done for the categories

Cheers :)

PS i would like the categories name to be copied to the meta sections as above, but obviously with the 'categories_description'.categories_name' being the source for the copy

30 Jun 2009, 4:46 PM
#67
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

On the demo data, this is DVD ... Action ... Lethal Weapon Linked ... (products_id 13) default tags:

<title>Lethal Weapon Linked [DVD-LTWP] - $34.99 : Zen Cart!, The Art of E-commerce</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="keywords" content="Lethal Weapon Linked [DVD-LTWP] Hardware Software DVD Movies Gift Certificates Big Linked Test Examples Free Call Stuff Test 10% by Attrib Test 10% A Top Level Cat Sale Percentage Sale Deduction Sale New Price Big Unlinked New v1.2 Music Documents Mixed Product Types TEST CATEGORY ecommerce, open source, shop, online shopping" /> <meta name="description" content="Zen Cart! Lethal Weapon Linked [DVD-LTWP] - Regional Code: 2 (Japan, Europe, Middle East, South Africa). Languages: English, Deutsch. Subtitles: English, Deutsch, Spanish. Audio: Dolby Surround 5.1. Picture Format: 16:9 Wide-Screen. Length: (approx) 100 minutes. Other: Interactive Menus, Chapter Selection, Subtitles (more languages). " /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="author" content="The Zen Cart™ Team and others" /> <meta name="generator" content="shopping cart program by Zen Cart™, <http://www.zen-cart.com> eCommerce" />

If I make the changes you suggest, I would have:

<title>Lethal Weapon Linked Lethal Weapon Linked [DVD-LTWP] - $34.99 : Zen Cart!, The Art of E-commerce</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="keywords" content="Lethal Weapon Linked ecommerce, open source, shop, online shopping" /> <meta name="description" content="Lethal Weapon Linked " /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="author" content="The Zen Cart™ Team and others" /> <meta name="generator" content="shopping cart program by Zen Cart™, <http://www.zen-cart.com> eCommerce" />

How is this a benefit? :unsure:

30 Jun 2009, 5:27 PM
#68
jamie2k avatar

jamie2k

New Zenner

Join Date:
Oct 2006
Location:
Suffolk UK
Posts:
55
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

i seem to learn a new starnge fact about zen cart every day, don't you just love it :)

I imagined that as the "meta tags" hazardous waste symbol says undefined; this meant that there were no details added, so by what you show above this is not the case.

am i correct ?

regards

Jamie

30 Jun 2009, 6:52 PM
#69
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

The black biohazard means that there are no "custom" meta tags defined ... the orange means that there are ...

The meta tags are automatically built either by default, or from the custom meta tags ...

As to building better content, be sure you use good descriptions on both Categories and Products so that you are not using vague descriptions such as:

Everyone loves this Product!

This is a great tool for you!

Get on today!

Those statements mean nothing ...

Hint: If reading the description to someone with their eyes closed means nothing to them ... then it will mean nothing to anyone else or the search engines ... :cool:

30 Jun 2009, 7:15 PM
#70
jamie2k avatar

jamie2k

New Zenner

Join Date:
Oct 2006
Location:
Suffolk UK
Posts:
55
Plugin Contributions:
1

Re: mmmm...Meta Tags - help/guidance needed

Thank you Linda,

Your explanation is clear and your time on this valued :)

I use very clear info on the site, provided by the brand owners direct, so no issues there.

Now i am educated, i can leave this element alone as zen, once again amazes me with the attention to detail.

Many thanks

Jamie

PS... i would like to reward the team with some coffee, but don't have tha abality to do so without an invoice or reciept. Any suggestions ???

30 Jun 2009, 7:53 PM
#71
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

You may private message me to discuss this over a cup of coffee if you like ... :cool:

17 Feb 2010, 7:28 AM
#72
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Hi Linda,

is html_header.php the correct place to change the order of the individual product titles and the tag line? I was wanting the store name to come first before the product name, price, model etc....my template does not seem to have one.

17 Feb 2010, 9:23 AM
#73
bikeforce avatar

bikeforce

New Zenner

Join Date:
Sep 2009
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Hello, my meta tag titles are not showing how I want them too. I am aware that all the meta fields need filling out and you can globally configurate them in product types and product info in the admin area. However it doesnt seem to be making any difference to my meta tags titles. All I am bothered about is for the product info pages and catgeories to show the titles I have put when defining individual meta tags.

I have taken a look at the meta_tags.php and they are pretty much on default, I have also tried creating a folder with my template name and placing it inside there.

The problem is when either globally or per product I try to define which meta tags to include in the title it makes no difference.

For example - in the title I wish to show: Meta tags - Title, everything else set to off. What I get is product name and model?

As I say I have tried doing globally and per product and nothing is working. Any suggestions appreciated.

17 Feb 2010, 2:33 PM
#74
ajeh avatar

ajeh

Oba-san

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

Re: mmmm...Meta Tags - help/guidance needed

The meta_tags.php controls the display ...

If you customize your Meta Tags, do you see a Black or Orange icon for the Meta Tags?

17 Feb 2010, 2:56 PM
#75
bikeforce avatar

bikeforce

New Zenner

Join Date:
Sep 2009
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Ajeh:

The meta_tags.php controls the display ...

If you customize your Meta Tags, do you see a Black or Orange icon for the Meta Tags?

Yes I have filled all the fields out for certain products including description seperated by commas. The Meta tage symbol turns orange.

I dont get the meta tag title if i set this to on and everything else to off. I get "product name {Model}: global title (defined in meta_tags.php) "

This seems to be reverting back to some kind of default even though both globally and locally I have specified I want to only show meta title - in the product types and product info.

Meta_tag.php as follows;
"
// page title
define('TITLE', 'Bike Force');

// Site Tagline
define('SITE_TAGLINE', '');

// Custom Keywords
define('CUSTOM_KEYWORDS', '');

// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', 'Bike Force, Bicycle Parts, Bicycle Accessories');
define('HOME_PAGE_META_KEYWORDS', 'Bike Force, Bicycle Parts, Bicycle Accessories');

// NOTE: If HOME_PAGE_TITLE is left blank (default) then TITLE and SITE_TAGLINE will be used instead.
define('HOME_PAGE_TITLE', ''); // usually best left blank "........

PRODUCT INFO

PRODUCT TYPES

META TAGS FOR PRODUCT

META TITLE

What I want for title is the title I have defined in the meta tags for this product (and maybe product name but I could put this in as a title if i wanted that)

Thanks

17 Feb 2010, 10:16 PM
#76
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Sorry to steal the spotlight from bikeforce, how would you in his example move Bike Force the store name before the product name for all products with and without meta tags?

ie.

Bike Force - MET Aliseo S Ladies .....

21 Feb 2010, 6:26 PM
#77
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Google and other Search engine optimization is the reason we use meta tags. Google is one of the biggest so it makes sense to read and follow their rules.
Google also has some useful free tools

  • Insight for search
  • Keyword Tool from AdWords
  • the newer search based Keyword Tool
    Keyword stuffing is a big nono and one it is easy to commit. Looking at the image above I see the word helmet twice in six keywords. This is way over the recommended 'density' of 3% - 7%.

Quick fix
> Ladies, helmet, helmets, womens, small, pink, whiteThe Keyword Density Cloud tool is extremely useful to check (from the search engine's point of view) to see if your density is too high. If it is, use synonyms.

I have no affiliation to that site.

22 Feb 2010, 4:13 PM
#78
bikeforce avatar

bikeforce

New Zenner

Join Date:
Sep 2009
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Henrietta:

Google and other Search engine optimization is the reason we use meta tags.

You dont say?

Yes thankyou for your advice however my zen cart meta fields are still not showing up correctly anyway (see above post). My Zen Cart is buggy or misconfigured and I have to try to work out how to fix this as so far I have recieved no support on this as Zen Cart is Free ecommerce cart and there is no support.

So before I correct my meta tag content i need them to display first. I am looking in to it as we speak and then yes I will correct my meta descriptions.

However my main reason for using the meta fields at present is so alternative words for my products are seen when the user uses advanced search they get picked up.

26 Feb 2010, 12:42 PM
#79
bikeforce avatar

bikeforce

New Zenner

Join Date:
Sep 2009
Posts:
73
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

After Tearing My site apart and piecing it back together like a jigsaw I found the culprit.

News and Articles Managment Optional install overote my meta_tags.php

I have now fixed this problem by deleting it and replacing with the original meta_tags.php

Note to self - will double check addons dont have adverse results.

21 Mar 2010, 6:54 PM
#80
cp00 avatar

cp00

New Zenner

Join Date:
Oct 2009
Posts:
12
Plugin Contributions:
0

Re: mmmm...Meta Tags - help/guidance needed

Hi,

Is it possible to manually enter the products title tags, but leave the description and keywords dynamically generated? Maybe some files need editing, but I have no idea which. Currently, when only the title is changed nothing happens, as the system needs the rest tags filled in, to make the change valid. I can see the reason why this is so, but if I manually have to enter the description and keywords for every product additionally, it would really make the process quite long and difficult.