Understanding Your Zen Cart meta_tags.php Language File

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.

Updating the Weight of All Products in Your Zen Cart Store Through a SQL Command

October 29th, 2008

Sometimes, you may need to update certain aspects of all products in your catalog. Instead of manually changing the aspect (in this case weight) of each product, you can run a simple SQL command through your Admin –> Install SQL Patches.

Here’s how to update the weight of ALL products in your catalog to 1/2 lb:
1. First, ALWAYS do a data base backup. If you have the Database Backup from Admin mod installed go to Tools -> Database Back Up MySQL and back up your database.
2. Go to Tools -> Install SQL Patches and run the following code:
UPDATE products SET products_weight = 0.5;

All products now have the weight of 1/2 lb. If you want the weight to be different, just change the 0.5 to whatever weight you want. The number should be in pounds.

If you have items in your catalog that are down loadable products, they must have a weight of 0. The most common instance of down loadable products is Gift Certificates. To update the weight of all products EXCEPT your gift certificates, enter the following command in step 2:
UPDATE products SET products_weight = 0.5 WHERE master_categories_id != 26;

This will update ALL products weight EXCEPT those in category 26 (gift certificate category). Change the master_categories_id to your actual number.

How to Add Additional Order Status Options in Zen Cart

October 27th, 2008

By default, Zen Cart comes with 3 Order Status options; processing, delivered and update. Oftentimes, you may want to add additional options such as “Shipped”. Adding new options is quite easy, just follow the steps below.
1. Go to Localization –> Order Status in your Zen Cart admin area and click on the “Insert” button.

2. Enter your new Order Status in the field provided and click on the “insert” button.

Now when processing orders, you will have “Shipped” as a Order Status option.

Happy Zen Cart!

Adding a “New Product” Icon to Product Description Pages in Zen Cart

October 24th, 2008

Here’s an easy way to add a “New Product” icon automatically to your product description pages in Zen Cart.

1. Create a small graphic that says New or NEW PRODUCT and name it new.gif. Then upload your image to includes/templates/YOUR_CUSTOM_TEMPLATE/images .

2. Open includes/templates/YOUR_CUSTOM_TEMPLATE/css/stylesheet.css at the bottom add the following lines:

.newProduct {
background-image:url(../images/new.gif);
width: Your image width in px;
height: Your image height in px;
}

Make sure you enter your actual image pixel dimensions.

3. Open includes/templates/YOUR_CUSTOM_TEMPLATE/templates/tpl_product_info_display.php and add the following:

$datesql = “select products_date_added from zen_products where products_id = “. (int)$_GET['products_id'] .” “;
$date_display = $db->Execute($datesql);
$newdate = $date_display->fields['products_date_added'];
$newdate2 = $newdate - 30;
function reformatDate($newdate) {
list($year, $month, $day, $hour, $min, $sec) = split( ‘[: -]‘,
$newdate);
return “$year-$month-$day”;
}
$dateA=$newdate;
$theDate=reformatDate($dateA);
$thirty_days_ago = mktime()-2592000;
if ($theDate >= date(’Y-m-d’, $thirty_days_ago)) { echo ‘<div class=”new”>
</div>’; }
?>

You may have to play with the placement of the code to get the image in the correct place.

Your products will display the new.gif icon you created for 30 days!

How to Offer Free Shipping in Zen Cart

October 22nd, 2008

Offering Free Shipping on orders over a certain dollar amount is a great promotion and is easy to set up!

1. Log in to your Zen Cart admin
2. Go to “Modules -> Order Total”

3. Click on “Shipping”, default installation 6th line. See screen shot, click for full size view.


4. Click on the “edit” button
5. Check “Yes” under “Allow Free Shipping”, enter the minimum dollar amount an order must have to receive free shipping.Select National, international or both for Free Shipping zones. See screen shot, click for full size view.


6. Click “update” for your changes to take effect.