Archive for the ‘Zen Cart SEO Tips’ Category

Moving the Nav Cat Tabs to Help Zen Cart SEO

Sunday, November 23rd, 2008

If you have a web site that uses drop menus for the navigation system, you may find that the indexing of your web site has a bit to be desired. Recently, on a web site using the drop menu system, I took advantage of using a second navigation menu at the bottom of the site by moving the nav cat tabs to the tpl_footer.php file.

To make the switch, open:

includes/templates/Your_Template/common/tpl_header.php and look for:

<!–bof-optional categories tabs navigation display–>

<?php get_template_dir(’tpl_modules_categories_tabs.php’,DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/tpl_modules_categories_tabs.php’); ?>

<!–eof-optional categories tabs navigation display–>

Copy the code, delete it and open:
includes/templates/Your_Template/common/tpl_footer.php

Paste your copied code into the footer file in the appropriate postition.

Upload both of the edited files and turn on your Nav Cat Tabs in the Zen Cart admin by going to:

Configuration -> Layout Settings -> Categories-Tabs Menu ON/OFF and turn the Nav Cat Tabs on.

Go to your web site and see your category links in the footer of each page. Now search engines have easy to read text links for your categories.

Understanding Your Zen Cart meta_tags.php Language File

Saturday, November 8th, 2008

In a previous post, I discussed how to add custom meta tags for your products and categories, Read Post.

Recently, when adding custom meta tags for products I noticed that the custom tags I entered at the product level were followed by the custom tags I had set in the meta_tags.php language file and this created a VERY long list of keywords. As you know, google and other search engines will penalize you for keyword spam if you have too many keywords.

To show only the keywords you set at the product or category level, download the file:
includes/languages/english/meta_tags.php

OR
includes/languages/english/YOUR_CUSTOM_TEMPLATE/meta_tags.php (if the file has already been modified)

Open the file and remove all keywords in the following define:
// Custom Keywords
define(’CUSTOM_KEYWORDS’, ”);

Upload the file to: includes/languages/english/YOUR_CUSTOM_TEMPLATE/

Now, any products or categories that have meta tags defined in the admin section of your web site will use ONLY those tag definitions and you will no longer be keyword spamming.

Custom Meta Tags for Zen Cart Products & Categories

Monday, October 20th, 2008

Did you know that you can create custom META tags for every category and product that you have in your Zen Cart store? It’s easy, just navigate to the category/product list page in your Zen Cart admin and click on the edit Meta Tags icon. They look like this: Meta Tags Off or Meta Tags On. Type in your title, keywords and description and then click the “Save” button. When you go to your web site you will see the updated tags.

Using PHP str_ireplace() Function to Help with Zen Cart SEO

Friday, August 15th, 2008

This Zen Cart SEO tip is very esoteric, I’ve only used it once but with great results.By using php’s str_ireplace() function, you are able to name your categories with SEO in mind.

Background: Let’s say you sell everything red; red dresses, red hats, red shoes and so on. Your store is even named The Red Store. When setting up your categories you create Red Hats, Red Dresses, etc. You have the SEO mod installed and your url reads “red-dresses-c-1.html” , so far so good. But now you go to the front of your site and you just don’t like the way the category names look…. do customers really need to see “Red” before every category name?
Use: In my application, the web site is using category tabs across the top of the header and changes will relate to that set up but with a bit of thought you can use this tip no matter which category option you are using.

Download includes/modules/categories_tabs.php at the bottom of the file look for:

// create link to top level category

$links_list[] = ‘<a class=”‘ . $new_style . ‘” href=”‘ . zen_href_link(FILENAME_DEFAULT, ‘cPath=’ . (int)$categories_tab->fields['categories_id']) . ‘”>’ . $categories_tab_current . ‘</a> ‘;

$categories_tab->MoveNext();

And replace with:

// create link to top level category

$links_list[] = ‘<a class=”‘ . $new_style . ‘” href=”‘ . zen_href_link(FILENAME_DEFAULT, ‘cPath=’ . (int)$categories_tab->fields['categories_id']) . ‘”>’ . str_ireplace(”RED”,”",”$categories_tab_current”) . ‘</a> ‘;

$categories_tab->MoveNext();

Upload your edited file to includes/modules/yourCustomTemplate/

Go to your web site to see your changes. The category names are now just dresses, hats, shoes etc but the url, breadcrumb and headline tags have the complete category name. I would love to hear about how you’ve used this tip!

Displaying a Category Description on a Product Page in Zen Cart

Saturday, July 26th, 2008

Zen Cart shows the category description on the product list page by default. There are times where you may want to display the category description on the product detail page. Here’s how:

1. Download and open includes/templates/template_default/templates/tpl_product_info_display.php

2. Add the code below where you would like the description to appear:

<!–show category description on product info page–>
<?php
$current_categories_description = “”;

// categories_description

$sql = “SELECT categories_description

FROM ” . TABLE_CATEGORIES_DESCRIPTION . ”

WHERE categories_id= :categoriesID

AND language_id = :languagesID”;

$sql = $db->bindVars($sql, ‘:categoriesID’, $current_category_id, ‘integer’);

$sql = $db->bindVars($sql, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

$categories_description_lookup = $db->Execute($sql);

if ($categories_description_lookup->RecordCount() > 0) {

$current_categories_description = $categories_description_lookup->fields['categories_description'];

}
?>

<?php echo $current_categories_description; ?>
<br />
<!–end show descriptions–>

3. Save and upload the file to includes/templates/YourCustomTemplate/templates/tpl_product_info_display.php

As a tip, this can be used to add additional keyword rich text to your product pages.