Forums / Basic Configuration / Yikes!!! General Prod Meta configs not updating!

Yikes!!! General Prod Meta configs not updating!

Views: 2,956

Results 1 to 13 of 13
17 Oct 2013, 6:05 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Yikes!!! General Prod Meta configs not updating!

Hi,

I went into admin to update my Meta Tag settings:
Admin > Catalog > Product Types > Product - General > Edit Layout

I changed the following to 0:
Show Metatags Title Default - Product Price
Show Metatags Title Default - Product Tagline

But the price and site tagline are still showing up!

Can someone please take a look and tell me what went wrong?
http://2staging.apswittcosales.com/Soldering_Desoldering/Tip_Cleaners/Hakko/Hakko_FT700_Tip_Polisher_w_FS100-01

As you can see, both the price and site tagline are still showing up (both at the end of title).

Thank you so much!
~Mike

17 Oct 2013, 6:07 PM
#2
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Oh. The product type for every product on the site is 1. I assume that correlates to "Product - General".

17 Oct 2013, 6:30 PM
#3
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Ok, got rid of price in title. The solution lives here:
Admin > Configuration > Product Info > Meta Tags - Include Product Price in Title

But still cannot get rid of the tagline (SMT Supplies and Equipment).

17 Oct 2013, 6:39 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Yikes!!! General Prod Meta configs not updating!

Feznizzle:

I went into admin to update my Meta Tag settings:
Admin > Catalog > Product Types > Product - General > Edit Layout

I changed the following to 0:
Show Metatags Title Default - Product Price
Show Metatags Title Default - Product Tagline

But the price and site tagline are still showing up!
Those are the "defaults", for NEW products that you've not yet created.

If you want to change the setting for individual existing products, just edit those products' metatags and change the radio button.
Or if you have a ton of products, you can do some direct SQL queries to alter the settings en masse.

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

17 Oct 2013, 6:40 PM
#5
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Yet another issue... ZC is automatically creating it's own meta descriptions and keywords.

The meta descriptions for EZ Pages are completely irrelevant! The description does not take from the body of the page, rather it just spits out all the names of the categories.

Same thing for Key Words, which I don't want ANY keywords at all.

Frustrating. I will post solutions as I find them, in case anybody else has this problem.

Here is a handy tool for looking at all your meta data:
http://www.seocentro.com/tools/search-engines/metatag-analyzer.html

17 Oct 2013, 7:03 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Yikes!!! General Prod Meta configs not updating!

Feznizzle:

... ZC is automatically creating it's own meta descriptions and keywords ...
Hopefully this will help you in the crusade to completely control / alter generated meta tags for Zen Cart! Or at least give you a good starting point :-)

"/includes/modules/meta_tags.php" controls how meta tags are constructed and displayed for each type of "page" (/includes/modules/pages/page_type).

You can add defines to either your language files or in a new extra_configures file to override the generated meta tags and the title. You could also code an observer to listen for "NOTIFY_MODULE_START_META_TAGS" and override the generated meta tags and title.

For keywords you can remove the line in the header of you Zen Cart template which outputs the meta keyword if you do not want them ever to show up. Alternatively you can define 'KEYWORDS' to be '' to stop categories from being added to the keywords of a page (and still use the ones configured in the admin for products / categories).

You can specify by "page" type to use specific keywords (such as for "advanced_search", "password_forgotten", etc):

define('META_TAG_TITLE_PASSWORD_FORGOTTEN', 'Title to use for the password_forgotten page');
define('META_TAG_DESCRIPTION_PASSWORD_FORGOTTEN1', 'Description to use for the password_forgotten page');
define('META_TAG_KEYWORDS_PASSWORD_FORGOTTEN', 'Keywords to use for the password_forgotten page');

For EZ-Pages:

define('META_TAG_TITLE_EZPAGE_1', 'Title for EZ-Page 1');
define('META_TAG_DESCRIPTION_EZPAGE_1', 'Description for EZ-Page 1');
define('META_TAG_KEYWORDS_EZPAGE_1', 'Keywords for EZ-Page 1');

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

17 Oct 2013, 7:05 PM
#7
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Hi DrByte,

Thanks for looking. I have more than 3000 products, won't be able to go one by one as suggested.

However, just to see if I could get it to work, I tried using the radio buttons on the example I provided in the OP. Site tagline refuses to die, no matter what I do.

17 Oct 2013, 7:09 PM
#8
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Woah! Thanks lhungil, I didn't see your post. I am digesting that info now...

17 Oct 2013, 7:27 PM
#9
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Yikes!!! General Prod Meta configs not updating!

Yeah, I've played around with the meta tag code in the past. And you are welcome!

I feel the Zen Cart meta tag system out of box works pretty well... And for most needs I suspect one can customize the meta tags without needing to change the core files. To fit needs not anticipated by Zen Cart (or the stock file) one could create a "template" override version of that file (I've only done this once, before I knew the observer system as well as I now do).

I've also in the past just created a quick SQL or PHP script to populate the Zen Cart category / product meta information after a bulk import according to certain rules... But that was before I found the handy way to set a "default" layout for meta tags which DrByte mentioned :)

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

21 Oct 2013, 3:29 PM
#10
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Ok, some progress to report, but difficulties continue.

I was able to kill the garbage keywords by editing /includes/modules/MY_TEMPLATE/meta_tags.php.

Changed:
define('KEYWORDS', str_replace('"','',zen_clean_html($keywords_string_metatags) . CUSTOM_KEYWORDS));

To:
define('KEYWORDS', '');

This got rid of all the unrelated categories that were showing up in the keywords of products.

My product meta titles persisted in having a ':' trailing the title. Eventually I was able to get rid of that by editing: /includes/languages/english/MY_TEMPLAT/meta_tags.php

Changed:
define('PRIMARY_SECTION', ' : ');

To:
define('PRIMARY_SECTION', ' ');

++++
The remaining mystery how to kill the automated product meta_description. That one is actually not horrible, once the categories have been removed. Categories were being scooped up as keywords, then dumped into the product meta description.

The way it works now, ZC is scrubbing HTML from the product page, then dumping it as meta description. The length of the ZC meta description is some 920 characters, far exceeds what SE's want. Even that would not bother me, except that ZC continues to use the product title as keywords (which is fine I guess) and leads the description off with the product title.

The result is that Meta Title shows, then the description wastes content by repeating the title yet again.

Can somebody show me which line of code to kill in order to stop that?

Thanks,
Mike

21 Oct 2013, 4:37 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Yikes!!! General Prod Meta configs not updating!

So, basically you're saying that you want to completely turn off the automated stuff and hand-code all your metatag content one by one?

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

21 Oct 2013, 4:56 PM
#12
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

No, not necessarily. I like automating the title. And I probably would not object to the automated description, if it did not repeat the title.

Setting that aside, ZC meta description is basically doing what the google bot will do anyway (scrub html, present text as description). Difference being that meta descriptions are limited to 200 characters. So what happens to the extra portion that SE's won't take? Do they lop it off and only present your 1st 200 words?

By giving a meta description, you are telling SE's "This is what I want you to present in the search results." If they lop off 700 characters, only take 200, then you best hope nobody is looking for what appears deeper in the body of your description.

On the other hand, if you have no meta description, you are not giving SE's any instruction about what to present. They simply log everything from your page. Now lets say someone searches for something that appears below that first 200 characters in your meta desc.

What will google present to the searcher?

I'm not sure. It's kind of a rhetorical question. I suspect google logs both, meta descrip and actual content. And they probably automatically decide what to show, based on key word usage.

9 Dec 2015, 5:26 PM
#13
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Yikes!!! General Prod Meta configs not updating!

Ok, I just ran into all these problems again while working on a ZC154 so I wanted to update this thread.

The fixes on Post#10 suggests searching for a string of code (KEYWORDS), then replacing with text provided. Something has changed in code, so you just have to find the KEYWORDS string that looks similar, then make the change.

At the end of post #10, I pointed out another problem and asked how to fix it:

Meta Title shows, then the description wastes content by repeating the title yet again.

Can somebody show me which line of code to kill in order to stop that?

When you get indexed, your page will show up like this (problem highlighted in red):

**Here is Your Product Title
**Here is Your Product Title - This product sure is wonderful. Would you like to
buy it? You won't regret it! I have lots of things to say about it, only no spa...

Anyway, I figured out how to stop the title from repeating. Find this file:
/public_html/includes/modules/MY_TEMPLATE/meta_tags.php

Around line 274 (asdfafdafd), you will find this:
define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . ' ' . $meta_products_name . SECONDARY_SECTION . $meta_products_description . ' '));

Change to this:
define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . ' ' . $meta_products_description . ' '));

After you do that, your page will show up like this:

**Here is Your Product Title
**This product sure is wonderful. Would you like to buy it? You won't regret it! I have
lots of things to say about it, and plenty of space to say whatever I want.

Hope this helps somebody! :)