I read threads about this but cant figure it out. I simply want my homepage keywords and description to be different naturally. I enter keywords in meta_tags.php and now the description also has all my keywords in it.
Thank you
Version 1.3.7
I read threads about this but cant figure it out. I simply want my homepage keywords and description to be different naturally. I enter keywords in meta_tags.php and now the description also has all my keywords in it.
Thank you
Version 1.3.7
I followed the above advice of Dr. Byte but where would I look to see the effect of this edit? It doesn't show in the source of my index page.Re: Meta Tag Delima
Try this:
1. Copy /includes/modules/meta_tags.php to /includes/modules/YOURTEMPLATE/meta_tags.php
2. Edit the /includes/modules/YOURTEMPLATE/meta_tags.php file.
Around line 93 you'll see this: Code:
case 'index':
Insert the following BEFORE that line: Code:
case ($this_is_home_page): define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE); define('META_TAG_DESCRIPTION', HOME_PAGE_META_DESCRIPTION); define('META_TAG_KEYWORDS', HOME_PAGE_META_KEYWORDS); break;
Then go to your /includes/languages/english/ folder and copy meta_tags.php to YOURTEMPLATE/meta_tags.php
and add these to the file:
Code:
define('HOME_PAGE_META_DESCRIPTION', 'My Home Page description metatags');define('HOME_PAGE_META_KEYWORDS','My home page keywords here');
Now you can customize your home-page keywords till your heart's content.
The rest of the pages will operate based on the selected category's metatags or the selected product's metatags.
www.all4coffee.com
Is HOME page a different page than index.php?
Is Main page the same as index?
Thanks!
you would see the effect by adding the web developer add-on for Firefox or IE and looking under Information.
I kindly thank you for your reply. When I look at the source code on my index.php page at www.all4coffee.com I see only the standard site-wide meta tags as they are assigned in html_header.php
I made edits suggested by Dr. Byte in his post
http://www.zen-cart.com/forum/showpo...57&postcount=4
but cannot figure out on which page they are supposed to show up...
Are terms index page, main page and home page referring to the same page? Or all three are different pages? How do I find the HOME page that changes in Dr. Byte's edit are supposed to show?
yes they are all the same page etc... index.php when I looked at your main page using Firefox with the web developer plug-in under Information, view meta tag Information this is what I saw, is this what you have in your setup?
http://www.all4coffee.com/
NameContentContent-Typetext/html; charset=iso-8859-1
keywords jura, capresso, specials, impressa, best, espresso maker, Lusso, PL-16, Impressa j5, Impressa z5, Impressa z6, Impressa s7, Impressa f8, Impressa e8, la pavoni, PUB 2V, PUB 1V, PUB 1EM, PUB 1M, Bar Star 2V, CAFE 2v, ZIP grinder,reviews, lapavoni, sale, coffee gifts, free, coupons,commercial espresso,superautomatic,best price,coffee business consulting, barista training, commercial equipment, opening coffee house, expresso, coffee, sipping chocolate,piatnik cards,art, tucson,arizona
description Since 1997 All 4 Coffee Tucson Arizona La Pavoni Capresso Authorized Dealer Retailer Reseller offers Jura-Capresso La Pavoni commercial Capresso Cappuccino Makers and provides espresso business consulting barista training services.imagetoolbarno
author All 4 Coffee
generator shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce
see there not the same!
pete
Last edited by colemanpa; 5 Jul 2008 at 02:20 AM. Reason: changed something
I thought the the purpose of DR. Byte's solution was that a customized meta_tags could be entered just for the Home page
In my includes/languages/english/mytemplate/meta_tags.php file I edited (for testing) the following
// Home Page ONLY Settings
define('HOME_PAGE_META_DESCRIPTION', 'Testing for home page This is the description for Home Page Only');
define('HOME_PAGE_META_KEYWORDS','Testing for home page, Capresso, Jura, La Pavoni');
so the above shows up on my home page but it doesn't... The meta_tags you see there are the same as they always been and still are in my
includes/modules/mytemplate/meta_tags.php file despite DR. Byte's edit shown i red:
// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'Jura Capresso Impressa Super Automatic Espresso Coffee Makers Grinders: Authorized Dealer Retailer Reseller La Pavoni specials sale reviews best prices free');
define('META_TAG_DESCRIPTION', 'Since 1997 All 4 Coffee Tucson Arizona La Pavoni Capresso Authorized Dealer Retailer Reseller offers Jura-Capresso La Pavoni commercial Capresso Cappuccino Makers and provides espresso business consulting barista training services.');
define('META_TAG_KEYWORDS', 'jura, capresso, specials, impressa, best, espresso maker, Lusso, PL-16, Impressa j5, Impressa z5, Impressa z6, Impressa s7, Impressa f8, Impressa e8, la pavoni, PUB 2V, PUB 1V, PUB 1EM, PUB 1M, Bar Star 2V, CAFE 2v, ZIP grinder,reviews, lapavoni, sale, coffee gifts, free, coupons,commercial espresso,superautomatic,best price,coffee business consulting, barista training, commercial equipment, opening coffee house, expresso, coffee, sipping chocolate,piatnik cards,art, tucson,arizona');
break;
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book':
define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_1);
break;
case 'address_book_process':
define('META_TAG_TITLE', NAVBAR_TITLE_ADD_ENTRY . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_ADD_ENTRY . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_ADD_ENTRY);
break;
case 'advanced_search_result':
case 'password_forgotten':
define('META_TAG_TITLE', NAVBAR_TITLE_2 . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_2 . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_2);
break;
case 'checkout_confirmation':
case 'checkout_payment':
case 'checkout_payment_address':
case 'checkout_shipping':
case 'checkout_success':
case 'create_account_success':
define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . HEADING_TITLE);
break;
case ($this_is_home_page):
define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', HOME_PAGE_META_DESCRIPTION);
define('META_TAG_KEYWORDS', HOME_PAGE_META_KEYWORDS);
break;
case 'index':
// bof: categories meta tags
// run custom categories meta tags
$sql = "select * from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . " mcd where mcd.categories_id = '" . (int)$current_category_id . "' and mcd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$category_metatags = $db->Execute($sql);
Do you have any idea what is wrong?
I really apreciate you willing to help!
Why are you editing the module file?
All the instructions in my post to which you are referring are for the language file.
.
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.
Your post at
http://www.zen-cart.com/forum/showpo...57&postcount=4
calls to edit the module file as well...
Please clarify. Thanks.
Never mind, Dr. Byte. I just realized that I do have this function already (to define unique title, description and keywords meta tags for the Home page) - with my: includes/modules/mytemplate/meta_tags.php file
which already includes the code
[FONT=Courier New]// Get different meta tag values depending on main_page values
switch ($_GET['main_page'[/FONT][FONT=Courier New]]) {
case ($this_is_home_page == true[/FONT][FONT=Courier New]):
define('META_TAG_TITLE', 'MY HOME PAGE CUSTOM TITLE '[/FONT][FONT=Courier New]);
define('META_TAG_DESCRIPTION', 'My HOME PAGE CUSTOM DESCRIPTION'[/FONT][FONT=Courier New]);
define('META_TAG_KEYWORDS', 'MY HOME PAGE CUSTOM KEYWORDS'[/FONT][FONT=Courier New]);
break; [/FONT]
The rest of the pages uses meta tags defined with my
includes/languages/mytemplate/meta_tags.php file
Was this originally built into the 1.3.7 or I did customize it in the past and forgot about it? Just wondering - otherwise why this solution
http://www.zen-cart.com/forum/showpo...57&postcount=4
Am I missing anything here?
It was added in v1.3.8. So you must have done it yourself.
.
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.