Jump to content
Sign in to follow this  
toyicebear

Easy Meta tags

Recommended Posts

Hello toyicebear, I hope you can help me. I did a fresh install of osCommerce RC2. I installed Ultimate SEO, STS 4, and Easy Meta Tags. The instructions say to add <?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?> wherever I want the meta tags to be generated. I have followed the instructions that you provided for STS users as well as added <?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?> to index.php, product_info.php, and product_info_reviews.php. When I go to the main page it has my "test" meta that i set. But when I go to categories/products, it simply is showing my domain, and that is it. I have customized templates in STS for product_info and index.php. If you need any more information please let me know. I have been trying to get a Meta Tag generator working for days now! Thanks.

Share this post


Link to post
Share on other sites
Hello toyicebear, I hope you can help me. I did a fresh install of osCommerce RC2. I installed Ultimate SEO, STS 4, and Easy Meta Tags. The instructions say to add <?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?> wherever I want the meta tags to be generated. I have followed the instructions that you provided for STS users as well as added <?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?> to index.php, product_info.php, and product_info_reviews.php. When I go to the main page it has my "test" meta that i set. But when I go to categories/products, it simply is showing my domain, and that is it. I have customized templates in STS for product_info and index.php. If you need any more information please let me know. I have been trying to get a Meta Tag generator working for days now! Thanks.

 

You should not follow both instructions sets, just the sts install instructions.

Share this post


Link to post
Share on other sites
You should not follow both instructions sets, just the sts install instructions.

 

I have done that but it didnt work so I tried something different. Does there need to be in META tags at all in the STS templates?

Share this post


Link to post
Share on other sites
I have done that but it didnt work so I tried something different. Does there need to be in META tags at all in the STS templates?

 

 

If you use STS then yes there needs to be done modifications to the sts class file to show meta info. (But not the individual files, just the one file listed in the install instructions)

Edited by toyicebear

Share this post


Link to post
Share on other sites
If you use STS then yes there needs to be done modifications to the sts class file to show meta info. (But not the individual files, just the one file listed in the install instructions)

 

I have done that. What kind of stuff needs to be done to the sts_template and my other template files? Does there need to be a TITLE tag? If you would please contact me on msn at cikez02@hotmail.com. Thanks.

Share this post


Link to post
Share on other sites

STS INSTALL. (Only for those who have the sts v4 template system installed)

 

1. in includes/modules/sts_inc/general.php

 

add this code before the last ?>

 

$sts->start_capture();

include(DIR_WS_INCLUDES . 'easy_meta_tags.php');

$sts->stop_capture ('metatags');

 

2. in includes/classes/sts.php

 

locate this code:

 

$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";

 

and replace it by this code:

 

$this->template['headcontent'] = $this->template['headcontent'].$this->template['metatags']. "\n";

 

 

3. In your language file(s) add this code before the final ?>: (For english that would be in this file includes/languages/english.php)

 

define('DEFAULT_META_TITLE', 'your meta title');

define('DEFAULT_META_DESCRIPTION', 'your meta description');

define('DEFAULT_META_KEYWORDS', 'your meta keywords');

 

4. Change the meta info text defines to the ones you want for your site.

Edited by toyicebear

Share this post


Link to post
Share on other sites
STS INSTALL. (Only for those who have the sts v4 template system installed)

 

1. in includes/modules/sts_inc/general.php

 

add this code before the last ?>

 

$sts->start_capture();

include(DIR_WS_INCLUDES . 'easy_meta_tags.php');

$sts->stop_capture ('metatags');

 

2. in includes/classes/sts.php

 

locate this code:

 

$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";

 

and replace it by this code:

 

$this->template['headcontent'] = $this->template['headcontent'].$this->template['metatags']. "\n";

 

 

3. In your language file(s) add this code before the final ?>: (For english that would be in this file includes/languages/english.php)

 

define('DEFAULT_META_TITLE', 'your meta title');

define('DEFAULT_META_DESCRIPTION', 'your meta description');

define('DEFAULT_META_KEYWORDS', 'your meta keywords');

 

4. Change the meta info text defines to the ones you want for your site.

 

I found the problem. I did a fresh install. If I install Easy Meta Tags BEFORE installing Ultimate SEO URLS, then it works. THanks.

Share this post


Link to post
Share on other sites

Hi,

 

Just wanted to say thanks very much. This works perfectly for what I need, and the simplicity to install was great. Also nice to know that it's simple enough that it's unlikely to go wrong (and that I could fix / alter it if I really needed to).

 

Great work :-D

Share this post


Link to post
Share on other sites

How can I make it so the model # also shows up in the title and keywords?

 

Thanks,

Shuey

Share this post


Link to post
Share on other sites
How can I make it so the model # also shows up in the title and keywords?

 

Thanks,

Shuey

 

Its possible by modifying includes/easy_meta_tags.php

Share this post


Link to post
Share on other sites
Its possible by modifying includes/easy_meta_tags.php

 

what would be the proper syntax?

 

i changed it so it shows the model, but not sure of the syntax to also have it show the products_name? anyone?

 

$meta_title_tag = $product_meta['products_model'];

 

 

thanks

Share this post


Link to post
Share on other sites
what would be the proper syntax?

 

i changed it so it shows the model, but not sure of the syntax to also have it show the products_name? anyone?

 

$meta_title_tag = $product_meta['products_model'];

 

 

thanks

 

$meta_title_tag = $product_meta['products_name'] . ' - ' . $product_meta['products_model'];

Share this post


Link to post
Share on other sites

Nick

 

I just had to write this brief note. Have shop on osC 2.2MS with a host of mods including SEO-G lastest version, QT Pro, Credit Account, coupons etc, etc.

 

Easy Meta Tags and SEO-G seem (as you said earlier) to go very well together and already have noted better SEO all round. I know one can be more specific and detailed in this field but your contribution was up and running automatically in minutes and there were simply NO clashes/error messages.

 

If only everything in osC was so, so simple. GREAT EFFORT - many thanks!

 

Michael

Share this post


Link to post
Share on other sites
I think the meta tag contribution is awesome! I do have a question though. What if there is a SSL code on there? Because mine is redirected from http to https, and I think it conflicts with the spider and the crawls. I used http://www.scrubtheweb.com/abs/meta-check.html to check mine.

 

 

It sounds like your website is not correctly configured.

 

A oscommerce site should only switch to ssl when going to the checkout part.

Share this post


Link to post
Share on other sites

Would I be able to fix that, or can that only be done by the host provider?

 

It sounds like your website is not correctly configured.

 

A oscommerce site should only switch to ssl when going to the checkout part.

Share this post


Link to post
Share on other sites
Would I be able to fix that, or can that only be done by the host provider?

 

 

Check your includes/configure.php file

Share this post


Link to post
Share on other sites
OK, I'm there.. what exactly am I looking for though? (I'm new to this)

 

 

This has nothing at all to do with the Easy Meta Tags mod, so if you have any further questions do start a new tread in the general support forum.

 

But here are some hints...

 

define('HTTP_SERVER', '');

 

should be something like this

 

define('HTTP_SERVER', 'http://YOUR_WEBSITE_ADDRESS');

 

Where YOUR_WEBSITE_ADDRESS ofcourse should be replaced by your websites url.

 

and make sure http:// is used and not https://

Edited by toyicebear

Share this post


Link to post
Share on other sites

I am a complete newbie at all this

 

I am installing v 1.5

 

I dont know what this means

 

4. Change the meta info text defines to the ones you want for your site.

 

 

could you give us a clue on where to find it

 

TIA

Share this post


Link to post
Share on other sites
I am a complete newbie at all this

 

I am installing v 1.5

 

I dont know what this means

 

 

 

 

could you give us a clue on where to find it

 

TIA

Put your meta tag information in as instructed.

eg

// Easy Meta Tags 1.5 - Edit to suit your site, results appear in index.php and product_info.php

define('DEFAULT_META_TITLE', 'your meta title - edit to suit in english.php');

define('DEFAULT_META_DESCRIPTION', 'your meta description');

define('DEFAULT_META_KEYWORDS', 'your meta keywords');

These ones are not automatically created, so you will have to work ot what you want. Google can help.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Nice contribution, however I may have found a bug! >_<

 

For example, if I was selling USB Cables and this was my description:

 

24" USB Cable

 

The meta tag gets cut short because the quotes after the 24 close the content attribute's value and therefore the only keyword assigned to this meta tag is 24.

 

Example:

<meta name="keywords" content="24" USB Cable" />

 

I did see this reply "Well you could modify this file: includes/easy_meta_tags.php to strip out " from descriptions and names "

 

Can someone point me in the right direction on how to modify this? I understand it would be an edit of the following, but I am not quite sure how to get the ereg_replace and preg_replace to work properly.

 

$meta_description = ereg_replace('<[^>]*>', '', $product_meta['products_description']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);

 

 

I would also like to add the category name after the product name just as someone else had asked here. Has anyone done this successfully?

Share this post


Link to post
Share on other sites

I've figured out how to get the category name to show after the product name. I've modified this file so much though I dont know what to share. Here's something to play with for those of you interested.

 

I can tell you that I added this:

 

$category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where cd.categories_id = pc.categories_id and pc.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);

 

after this:

 

$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 . "'");

 

and then this is what I changed to add the category after the products name:

 

$product_meta['products_name'] . ' | ' . $category['categories_name']

 

That returns a tag like this: PRODUCTS NAME | PRODUCTS CATEGORY

 

I'm still working on the double quote thing... If I figure it out I'll let you know.

Share this post


Link to post
Share on other sites

Sorry to bother everybody but could someone explain what difference this contribution makes, physically, to the page?

 

I have viewed the source before and after and cant spot any difference!! or am I looking at the wrong thing?

 

Nigel

Share this post


Link to post
Share on other sites
Sorry to bother everybody but could someone explain what difference this contribution makes, physically, to the page?

 

I have viewed the source before and after and cant spot any difference!! or am I looking at the wrong thing?

 

Nigel

 

 

It does not add anything to the visible part of the page at all.....

 

 

It does add the 3 meta tags to the code, which only can be viewd by choosing view source in your browser.

 

title , meta keywords and meta description

 

You will also see the name/title of the page in the browser top....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×