Jump to content



Latest News: (loading..)

* * * * * 4 votes

Meta Tags For Your osC Shop


  • Please log in to reply
184 replies to this topic

#161   josaenterprises

josaenterprises
  • Members
  • 3 posts
  • Real Name:Jamie Huffman

Posted 08 September 2009 - 11:57 PM

View PostArron Brown, on Jun 2 2009, 07:49 AM, said:

ive just installed the cDynamic Meta Tags v1.0 add on, and ive folloed the read me installation doc. however im getting the following error in my browser when i try to load my shop

Warning: main(includes/functions/meta.php) [function.main]: failed to open stream: No such file or directory in /homepages/20/d283444189/htdocs/catalog/includes/meta_tags.php on line 54

Fatal error: main() [function.require]: Failed opening required 'includes/functions/meta.php' (include_path='.:/usr/lib/php') in /homepages/20/d283444189/htdocs/catalog/includes/meta_tags.php on line 54

whats gone wrong?



I am having the same problem.  I now have three similar messages at the top of my website after installing Easy Meta Tags 1.6.  I followed the install instructions exactly, but now I have these three error messages showing for all the world to see.

I didn't understand the response to your message (I'm a VERY new user).  Do I need to install another add-on to go with the one I already installed?

Can you help me?

Jamie

#162 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 09 September 2009 - 02:05 AM

View Postjosaenterprises, on Sep 9 2009, 12:57 AM, said:

I am having the same problem.  I now have three similar messages at the top of my website after installing Easy Meta Tags 1.6.  I followed the install instructions exactly, but now I have these three error messages showing for all the world to see.

I didn't understand the response to your message (I'm a VERY new user).  Do I need to install another add-on to go with the one I already installed?

Can you help me?

Jamie

1. uninstall and remove files from other meta tags contribs which you might have added previously...the error abow is from cDynamic Meta Tags.


2. Easy meta tags install is very easy...

2.1 upload the file named , easy_meta_tags.php, included in the package into the /includes/ folder of your shop.

2.2 for any of the shop files you want meta tags: (typically, products_info.php , index.php and products_reviews_info.php)

you then just replace:

Quote

<title><?php echo TITLE; ?></title>

with

Quote

<?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?>

Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#163   josaenterprises

josaenterprises
  • Members
  • 3 posts
  • Real Name:Jamie Huffman

Posted 10 September 2009 - 02:43 AM

View Posttoyicebear, on Sep 8 2009, 10:05 PM, said:

1. uninstall and remove files from other meta tags contribs which you might have added previously...the error abow is from cDynamic Meta Tags.


2. Easy meta tags install is very easy...

2.1 upload the file named , easy_meta_tags.php, included in the package into the /includes/ folder of your shop.

2.2 for any of the shop files you want meta tags: (typically, products_info.php , index.php and products_reviews_info.php)

you then just replace:



with


Dear toyicebear,

THANK YOU SO MUCH!  The mistake I had made was to upload the easy_meta_tags.ZIP rather tha .PHP.  I uninstalled that and installed the correct file and it was all fixed.

Thank you so much!

Now would you be able to point me in the correct direction to find the support thread(?) that will tell me how to actually add the tags?

Sorry for my unending string of questions.

Thanks again,
Jamie

#164 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 10 September 2009 - 11:04 AM

View Postjosaenterprises, on Sep 10 2009, 02:43 AM, said:

Dear toyicebear,

THANK YOU SO MUCH!  The mistake I had made was to upload the easy_meta_tags.ZIP rather tha .PHP.  I uninstalled that and installed the correct file and it was all fixed.

Thank you so much!

Now would you be able to point me in the correct direction to find the support thread(?) that will tell me how to actually add the tags?

Sorry for my unending string of questions.

Thanks again,
Jamie


Using Easy Meta Tags  you do not add any tags, its all done automatically.

The only tags you add is for the frontpage and those are edited in the main language file .. ie. for english in includes/languages/english.php

Easy Meta tags support tread...
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#165   anandSEO

anandSEO
  • Members
  • 1 posts
  • Real Name:Anand

Posted 29 December 2009 - 11:44 AM

Hi,
I am new in SEO,
Please tell me how to install meta tags in v2.2.

AnandSEO.

View Postgarnet, on 06 June 2009 - 12:19 PM, said:

Hi
I use cDynamic_Meta_Tags v1.5.3
and there is a meta_tags.php for every language. this has been translated for bulgarian.
the problem is with the sql file

INSERT INTO `configuration` VALUES ('', 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>Leave empty for no description<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES ('', 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>Leave empty for no description<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES ('', 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

you can see it goes to configuration table and there are STORE_DESCRIPT, STORE_METDEX, STORE_KEYWORD,  you can modify this, but only in one language. The name of every page is your pages details plus some of the above that can be only in one language. The linking words (from ...\lang\lang\meta_tags.php) are picked up for the proper language.
Any ideas will be appreciated


#166 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 06 January 2010 - 12:05 PM

View PostanandSEO, on 29 December 2009 - 11:44 AM, said:

Hi,
I am new in SEO,
Please tell me how to install meta tags in v2.2.

AnandSEO.

Just use Easy Meta Tags instead, it has a very easy install.. you can find it here...
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#167   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 29 January 2010 - 10:05 AM

The following needs to be added to this thread, requires PHP 5.2+:

KissMT Dynamic SEO Meta & Canonical Header Tags

#168 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 29 January 2010 - 12:52 PM

KissMT Dynamic SEO Meta & Canonical Header Tags

This contribution inserts meta tags automatically for your shops pages incl. products and categories.

It also have further seo optimization, Google breadcrumbs, canonical page tags ++++

The meta tags are cached for shortest possible execution time, lower server load and faster page load time.

Requires PHP Version: 5.2.0+

Install

Install is very easy and straight forward.

Pros:
- Very easy install
- Easy on server resources due to caching
- Creates all your meta tags automatically for any amount of categories/products.
- Google breadcrumb
- Canonical Page tags (Prevents duplicate content penalties)
- Further SEO optimization
- Has category description as an optional add-in.

Cons
- You can not enter your product/category meta tags manually

Conclusion

This is a very good seo tool for those who have a pre-populated shop with many categories and products or for those who fill up their products using feed import as well as it is a very easy server load which is more and more important the larger your product/category numbers get.

Also its a good tool for those who want to have meta tags and titles but who do not want to manually insert them.

Last but not least if the header tags install is to much for you, then the easy install of this one will probably appeal to you.

Link to contrib....

Edited by toyicebear, 29 January 2010 - 01:05 PM.

Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#169   Peper

Peper
  • Members
  • 354 posts
  • Real Name:Pierre
  • Gender:Male
  • Location:South Africa

Posted 20 March 2012 - 10:17 AM

After reading most pages here the content seems now outdated

Why?

My store is running with the mobile contribution and about 2 months ago I changed the mobile site to include extra simple meta tags like description and keywords taken from product title as this will also be required for mobile browsers searching Google and so.
The strange thing is it was now outperforming the catalogue side according to its seo values

This was certainly not a good move towards my online shop catalogue which then ranked a few places or pages on as customers gets to mobile site and seemed bit strange for a shopping site.

I think seo for any shopping site is a nightmare if not done right as it seriously hurts the seo part
Any good views on what the meta title, description and keywords should be and how many characters for this tags?

Any views on this please
Contributions successfully installed : Header tags SEO, Scrolling new products, Customer testimonials, Support tickets, Polls, Link exchange, SPPC, X-sell, Master products, Dhtml menu, Image cache, Slide show, Product videos, Product custom sort, Product notes, Discount coupons, Ask question(review style + admin), CP builder, Customers also purchased, price list, // SEO URLS 5, and forgot the others and then a real admin setup.

#170   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 07:54 AM

View Posttoyicebear, on 21 March 2006 - 08:13 AM, said:

If you only want the product name to fill the metas like with the header tags auto fill function, you can actually achive that without installing any meta contrib.

It requires a very small modification of the file product_info.php

Here is how you do it....

1.

Locate this:



and replace it with this:



2.

locate this code: (about line  72 )


now mark this code section in the file and right click and choose "cut"

then locate this pice of code at the top of the file:



Right under this you then just past inn the section you marked previously.


after you have done so it will look like this:




Thats it.....now all your products will have the products name as tittle, meta description and meta keyword. (Just like if you had been using header tags and the auto fill function)

This is awesome! And you can use it with Easy Populate to make it big changes fast and easily!

Nick, one more thing with this.

You talk about the index.php.

Is it possible to use fields in the product_description to populate the meta tags on category pages in the same way as the product_info?

I think I know the answer but I want to check!

Edited by RMD27, 15 May 2012 - 07:58 AM.


#171 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 15 May 2012 - 08:36 AM

View PostRMD27, on 15 May 2012 - 07:54 AM, said:

Is it possible to use fields in the product_description to populate the meta tags on category pages in the same way as the product_info?

For index.php / category pages you better add it into categories_description
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#172   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 09:24 AM

View Posttoyicebear, on 21 March 2006 - 10:44 AM, said:

To complete this little meta hack..here is how to do it in the index.php file....

find this code at the top of the index.php file:



Directly under it past in this:





Then find this:



and replace it with this:



Now for the last part , in includes/languages/english.php  (and/or any other languages you use)

find this


and right under add this:

I tried this but I get this error



Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/***/public_html/index.php on line 91

This is line 91

<title><?php echo $category_name['categories_name']; ?></title>

I'm stumped, granted, that does not take a lot, but any help appreciated all the same....

Pasting this in does not cause any errors

if (isset($_GET['cPath'])) {
$category_name_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category_name = tep_db_fetch_array($category_name_query);
}
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$manufacturers_name_query = tep_db_query("select m.manufacturers_name from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$manufacturers_name = tep_db_fetch_array($manufacturers_name_query);
}

#173   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 09:26 AM

View PostPeper, on 20 March 2012 - 10:17 AM, said:

After reading most pages here the content seems now outdated

Why?

My store is running with the mobile contribution and about 2 months ago I changed the mobile site to include extra simple meta tags like description and keywords taken from product title as this will also be required for mobile browsers searching Google and so.
The strange thing is it was now outperforming the catalogue side according to its seo values

This was certainly not a good move towards my online shop catalogue which then ranked a few places or pages on as customers gets to mobile site and seemed bit strange for a shopping site.

I think seo for any shopping site is a nightmare if not done right as it seriously hurts the seo part
Any good views on what the meta title, description and keywords should be and how many characters for this tags?

Any views on this please

You have 2 sites with the same content? The only difference being one is for mobile the other for PCs?

#174   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 09:35 AM

View PostRMD27, on 15 May 2012 - 09:24 AM, said:

I tried this but I get this error



Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/***/public_html/index.php on line 91

This is line 91

<title><?php echo $category_name['categories_name']; ?></title>

I'm stumped, granted, that does not take a lot, but any help appreciated all the same....

Pasting this in does not cause any errors

if (isset($_GET['cPath'])) {
$category_name_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category_name = tep_db_fetch_array($category_name_query);
}
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$manufacturers_name_query = tep_db_query("select m.manufacturers_name from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$manufacturers_name = tep_db_fetch_array($manufacturers_name_query);
}

to clarify, this seems to be causing an issue

<?php if (isset($HTTP_GET_VARS['manufacturers_id'])) { ?>
<title><?php echo $manufacturers_name['manufacturers_name']; ?></title>
<meta name="description" content="<?php echo $manufacturers_name['manufacturers_nam"]; ?>">
<meta name="keywords" content="<?php echo $manufacturers_name['manufacturers_nam"]; ?>">
<?php
}
if ((basename($PHP_SELF) == FILENAME_DEFAULT) and (!isset($_GET['cPath']))) {
?>
<title><?php echo INDEX_META_TITLE; ?></title>
<meta name="description" content="<?php echo INDEX_META_DESCRIPTION; ?>"> <meta name="keywords" content="<?php echo INDEX_META_KEYWORDS; ?>"> <?php } if (isset($_GET['cPat"])) {
?>
<title><?php echo $category_name['categories_name']; ?></title>
<meta name="description" content="<?php echo $category_name['categories_nam"]; ?>">
<meta name="keywords" content="<?php echo $category_name['categories_nam"]; ?>">

<?php
}
?>

#175   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 10:30 AM

okay, i have downloaded the contribution from here http://www.oscommerce.com/community/contributions,4115

so on the index.php

All code pasted in, alas, no tags showing, it is not echoing the category title for some reason. I am using rc2 v2.2 if that makes any difference?

not sure if this is an issue

$category_name_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

categories_name is in the categories_description table not categories table. i am not sure if this is what is represented here or not??

Edited by RMD27, 15 May 2012 - 10:32 AM.


#176   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 11:59 AM

Another update - The heading title is showing this
HEADING_TITLE_NEW

if that helps?

#177 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 15 May 2012 - 12:09 PM

That's a very old mod..try this instead:

http://addons.oscommerce.com/info/5497
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#178   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 01:23 PM

View Posttoyicebear, on 15 May 2012 - 12:09 PM, said:

That's a very old mod..try this instead:

http://addons.oscommerce.com/info/5497

Boom! Its working!

But..

Easy loses the option to change the heading_title.

Im clueless, any chance you could tell me how to work in the heading_title code in the easy_meta_tags file?

In basic meta tags it was this


if (isset($_GET['cPath'])) {
$category_name_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category_name = tep_db_fetch_array($category_name_query);
define('HEADING_TITLE_NEW', $category_name['categories_name']);
}

and this



<?php echo HEADING_TITLE; ?>

Replace with:

<?php echo HEADING_TITLE_NEW; ?>

EDIT - okay i got it

<?php
// Easy Meta Tags 1.2.5 for osCommerce MS2.2/RC2.2/2.31
//index page metas
if (basename($PHP_SELF) == FILENAME_DEFAULT) {
if (isset($HTTP_GET_VARS['products_id'])){
$product_meta_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product_meta = tep_db_fetch_array($product_meta_query);
$meta_title_tag = $product_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $product_meta['products_description']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = $product_meta['products_name'];
}
if ((isset($_GET['cPath'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$category_name_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category_name = tep_db_fetch_array($category_name_query);
define('HEADING_TITLE_NEW', $category_name['categories_name']);
if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] != '1')) {
$page = '-' . $HTTP_GET_VARS['page'];
}
$meta_title_tag = $category_name['categories_name'] . (isset($page) ? $page : '');
$meta_description_tag = $category_name['categories_name'] . (isset($page) ? $page : '') . ' : ' . STORE_NAME;
$meta_keywords_tag = $category_name['categories_name']. (isset($page) ? $page : '');
}
if ((isset($HTTP_GET_VARS['manufacturers_id'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$manufacturers_name_query = tep_db_query("select m.manufacturers_name from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$manufacturers_name = tep_db_fetch_array($manufacturers_name_query);

$meta_title_tag = $manufacturers_name['manufacturers_name'];
$meta_description_tag = $manufacturers_name['manufacturers_name'] . ' : ' . STORE_NAME;
$meta_keywords_tag = $manufacturers_name['manufacturers_name'];
}
if ((!isset($_GET['cPath'])) && (!isset($HTTP_GET_VARS['manufacturers_id'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$meta_title_tag = STORE_NAME;
$meta_description_tag = STORE_NAME;
$meta_keywords_tag = STORE_NAME;
}
// product info metas
} elseif  (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) {
$product_meta_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product_meta = tep_db_fetch_array($product_meta_query);
$meta_title_tag = $product_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $product_meta['products_description']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = $product_meta['products_name'];
// product reviews info metas
} elseif  (basename($PHP_SELF) == FILENAME_PRODUCT_REVIEWS_INFO) {
$reviews_meta_query = tep_db_query("select rd.reviews_text, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");
$reviews_meta = tep_db_fetch_array($reviews_meta_query);
$meta_title_tag = NAVBAR_TITLE . ' :: ' . $reviews_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $reviews_meta['reviews_text']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = NAVBAR_TITLE . ' ' . $reviews_meta['products_name'];
} else {
//other pages 
if (HEADING_TITLE != 'HEADING_TITLE') {
$heading_title = HEADING_TITLE;
} else {
$heading_title = basename($PHP_SELF);
$patterns[0] = '/.php/';
$patterns[1] = '/.html/';
$patterns[2] = '/-/';
$patterns[3] = '/_/';
$replacements[0] = '';
$replacements[1] = '';
$replacements[2] = ' ';
$replacements[3] = ' ';
$heading_title = preg_replace($patterns, $replacements, $heading_title);
$heading_title = ucwords($heading_title);
}
$meta_title_tag = $heading_title; 
$meta_description_tag = $heading_title . ' : ' . STORE_NAME;
$meta_keywords_tag = $heading_title;
}
echo '<title>' . $meta_title_tag . '</title>' . "\n";
echo '<meta name="description" content="' . $meta_description_tag . '" />' . "\n";
echo '<meta name="keywords" content="' . $meta_keywords_tag . '" />' . "\n";
?>

Edited by RMD27, 15 May 2012 - 01:28 PM.


#179   RMD27

RMD27
  • Members
  • 295 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 15 May 2012 - 02:00 PM

okay one last thing!

I want to append a standard comment on the end of a title tag using include

for example

<?php include("index_meta_title.php"); ?>

index_meta_title will create words specific for each category. my question is where can I put the includes in easy_meta_tags.php?

I expect it has to go somewhere in here but it breaks with everything I have tried so far


echo '<title>' . $meta_title_tag . '</title>' . "\n";
echo '<meta name="description" content="' . $meta_description_tag . '" />' . "\n";
echo '<meta name="keywords" content="' . $meta_keywords_tag . '" />' . "\n";

#180 ONLINE   toyicebear

toyicebear
  • Community Sponsor
  • 6,053 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 15 May 2012 - 02:19 PM

if you want to add manual tags you should rather look at the  Header Tags SEO add-on.

Edited by toyicebear, 15 May 2012 - 02:21 PM.

Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.