How to Add Custom Meta to Zen Cart EZ Pages

By Melanie Prough on Friday, June 19, 2009
Filed Under: Zen Cart Tips, Zen Cart Tutorials












If you are using your EZ pages built in to Zen Cart, then you already know these are nice easy tools for creating static pages, except that they lack the cool Meta tools you have on your products and categories. Well, this function is not missing… It just hard coded.
Find includes/languages/english/YOUR-TEMPLATE/meta_tags.php

Back this file up before working on it. Use a program specifically for text editing, I recommend PSPAD, which is free to use. Never use Word or other editors which can add styles… Many times they will break your PHP files.

Open the meta_tags.php and find the following section:

define(’META_TAG_DESCRIPTION_EZPAGE_#’,”);
define(’META_TAG_KEYWORDS_EZPAGE_#’,”);
define(’META_TAG_TITLE_EZPAGE_#’, ”);

These 3 lines can be duplicated for each of your EZ Pages. The first thing to edit is replacing the # sign with the EZ Page number. Be careful not to add any spaces or additional characters.

Second, between the single quotes in the parenthesis add the information for the pages Meta and title elements.

Last, check the bottom of the file for additional line breaks (Line spaces) following the closing PHP tag ?>

Language files will very often malfunction if an additional line space exists after the closing tag.

So when done you have something like this:
define(’META_TAG_DESCRIPTION_EZPAGE_4’,”Zen Cart EZ Page Meta Description”);
define(’META_TAG_KEYWORDS_EZPAGE_4’,”Zen Cart, EZ Page, Meta Keywords”);
define(’META_TAG_TITLE_EZPAGE_4’, ”Zen Cart EZ Page Title”);

Remember, you can duplicate these language rules for any/all of your Zen Cart EZ Pages.

If you are using your EZ pages built in to Zen Cart, then you already know these are nice easy tools for creating static pages, except that they lack the cool Meta tools you have on your products and categories. Well, this function is not missing… It just hard coded.

Tags: , , , , , ,

Comments are closed.

Template Original