Zen Cart: Catchable Fatal Error in html_output.php

October 15, 2008 by Eric  
Filed under Zen Cart Optimization

I’ve been contacted recently by a number of Zen Cart users who are experiencing on occasion, an error similar to the following while working in the administrative section of their sites.

Catchable fatal error: Object of class queryFactoryResult could not be converted to string in … html_output.php

The problem you are experiencing stems from leftover legacy code that is incompatible with PHP5.

Here are two links that will help you understand and correct the issue.

http://www.zen-cart.com/forum/showthread.php?t=90739

http://www.zen-cart.com/forum/showpost.php?p=487734&postcount=11

An interim workaround has been provided by the Zen Cart team. The link to the files which solve this issue are provided here.

http://www.zen-cart.com/forum/showpost.php?p=487360&postcount=10

  Don't miss a single tip! Subscribe to my RSS feed.

E-Commerce Optimization and Marketing

Just a quick post here to update all the readers and newcomers to this blog (thanks and welcome to you all.)

Happy Ecommerce customerToday I decided to change the title of the blog from “Zen Cart Optimization and Marketing” to “E-Commerce Optimization and Marketing” for obvious reasons.

As many of you have already discovered, the information I post in this blog works for and applies to anyone running an e-commerce website, no matter what platform you have chosen.

I just happen to have chosen Zen Cart as my preferred open source shopping cart platform for the subject of most of my examples because of its robust and stable back-end, and because I have been an avid user of that system for many years now.

Having said that, if you are thinking of starting an e-commerce website, and are looking for an open source solution that has all the features to succeed, as well as an active developer community, then you should really consider Zen Cart.
Read more

  Don't miss a single tip! Subscribe to my RSS feed.

NOW AVAILABLE: Zen Cart 20 Ways Template Conversion Pack

Zen Cart Google Analytics
Includes all template files needed
to implement the most important 20 ways
Just $24.95

Secure Ordering

Since the release of the book 20 Surefire Ways to Increase Sales Using Zen Cart, I have had hundreds of requests from readers asking me to implement the template changes featured within the 20 Ways on their site.

As a result, I have created the “Zen Cart Template Conversion Pack” to help everyone benefit from and easily implement the template changes yourself.

The Conversion Pack Includes:

  • 20 Ways Complete Implementation Guide (10 pages)
  • Complete Zen Cart 1.3.7+ template files for use with your website (including the templates needed to create the side-by-side login shown in Surefire Way #2)
  • Complete Zen Cart 1.3.x template files for use with your website (including the templates needed to create the side-by-side login shown in Surefire Way #2)
  • Graphic “Action” Button Files ready for testing with your site.
  • Pre-Installed “Order Steps – Tabeless” Contribution
  • Pre-Installed “Telephone Optional on Signup” Contribution

Zen Cart Compatibility

Currently, the Conversion Pack includes templates that work with Zen Cart version 1.3.x and up.

I have implemented these changes on 1.2.x sites as well, but because the older Zen Cart versions were table structured, the alterations in the enclosed package will not work.

However, if you have an older version of Zen Cart (1.2.x) and would like these implemented, please contact me using the form on this website and let me know. I can arrange for you to get that version.

Simplify Your Checkout and Optimize Your Chances of Success

The template files in this pack have been tested over a large number of sites. They include some of the industry’s “Best Practices” and should help bring some of the major problems spots on your e-commerce site up to “standards”.

Testing has shown these templates to decrease cart abandonment once a user enters the checkout process, and help increase conversion by more clearly identifying what is required of a customer in order for them to complete the purchase.

Keep in mind that all industries and markets are different, and there is no substitute for continued testing, solid market strategy, and a product with a demand. The proven strategies implemented within these templates are a starting point to give you the best chance at success.

I know you will find them very beneficial and helpful on your quest for better conversion.

To Your Success!

Secure Ordering

DVD to iPod Conversion. How to convert DVD to iPod Video? DVD to iPod Converter. Enjoy watching movies on your iPod anywhere, anytime. Convert DVDs, VCDs, movies to iPod MP4 Video (iPod Nano, iPod Touch, iPod Classic, iPhone)

  Don't miss a single tip! Subscribe to my RSS feed.

Are You Losing Google Page Rank Because You Forgot the WWW?

There are many reasons why you should remain consistent with your naming conventions on the Internet, especially when it comes to your domain name.

One reason is for the dreaded “duplicate content” hit you might take with a site that is indexed with both the “www” and the “non-www” form of the domain name. Another, and the one I will focus on here is the fact that you could be cheating yourself out of higher Page Rank from Google by actually “splitting it across two domains”.

What do I mean by “splitting” Google Page Rank?

Google Page RankFirst off, let me explain in short what Page Rank really is. “Page Rank” really is a measure of the incoming links to your website. Also understand that just “getting links” is not going to necessarily increase your Page Rank. The links must contain relevant content to what you offer in order to give you the most benefit. Naturally speaking then, it would make sense that the more relevant links you have coming to your website (from other similar sites), the higher your Page Rank will be.

Ok, now that we got that out of the way, let me present you with the following.

Have you ever noticed that when you go to your site using a url like http://www.yoursite.com (with the “www”) you see your Google Page Rank as one number (out of 10) and when you view your site as http://yoursite.com (without the “www”) you see a different Page Rank number (out of 10)?

Or, have you ever performed a Google search for your site as follows on http://www.yoursite.com and on http://yoursite.com and noticed that you are indexed by Google under both the “www” variation and the “non-www” variation?

If so, you are a victim of Canonical naming conventions at work, and you could be losing Page Rank because of it.

Why is this important and what does it all mean? Well, it’s important because if you want to follow better Search Engine Optimization (SEO) practices, and get maximum benefit of your possible total Page Rank, then you need to pay attention to the way your site is indexed.

What does it mean? I’ll give you an example of what it can mean to you (for illustrative purposes only.) If your site has a possible (or potential) total Page Rank of 6 out of 10, and you are indexed with both the “www” and the “non-www” form of your domain name, then your Page Rank could be split to just 3 out of 10!

Much different than a 6 out of 10 right?

So how could it be just 3 out of 10 when its full potential is 6? Well remember, in our example, Google has you indexed as “2 different domains” (by Canonical naming conventions) even though you are the same website. Google has to allocate the incoming links to your site and give them a Page Rank accordingly so it “splits the links” across the two different domains. This split is not always “50 / 50″, but in our example I use that for ease of understanding.

It takes the portion of the links that point to your site’s “www” form (www.yoursite.com) and gives them a portion of the total Page Rank. It then takes the remaining links that point to the “non-www” form (yoursite.com) of your domain name and allocates them a Page Rank. This example assumes that 50% of the incoming links point to one domain form, and 50% to the other form.

Now does it make more sense? Google took the possible “6 out of 10″ Page Rank and split it into two equal halves of “3 for one domain”, and “3 for the other domain form”.

The result — instead of having a Page Rank “6 out of 10″, you now have a Page Rank “3 out of 10″.

You can’t control how others link to you (the “www” vs. “non-www” form of your domain — although you can try), but you can control what happens once they arrive at your site.

So you know you are a victim, what can you do to fix it?

In a previous post I talked very briefly about how I used a 301 redirect to move content from my old site to this; then new, domain.

You can use the same concept to redirect requests from your “non-www” domain to your “www” domain and vice versa. Just be consistent with which version you choose.

Quickly, let me show you one more example to demonstrate what the proper setup for your site gets you. In this case, I’ll use my domain (zencartoptimization.com).

The following are two examples that get you the same “common” end result.

Click on http://www.zencartoptimization.com/ (a new window will open). What do you see in the address bar of your browser? You should see the “www” version of the domain name.

Now, click on http://zencartoptimization.com/ (a new window will again open). What do you see this time in your address bar? Right! You again should see the “www” version of the domain name even though the link points to the “non-www” version!

So now we have “Canonical naming” consistency and our Google Page Rank will be combined into one final value.

Now, try the same thing for your own site. Type it with the “www” and without the “www”. See what end result you get.

If you do not get a consistent result (either both “www” url’s in the end or both “non-www” url’s in the end — whichever route you choose,) then you may want to consider adding a few lines of code to your .htaccess file (make sure it is located in your website’s root directory) to correct the situation.

Dynamic 301 Redirects Correct the www/non-www Canonical Issue

If you use the www version use this code

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomainhere(.*)
RewriteRule ^(.*)$ http://www.yourdomainhere.com/$1 [R=301,L]

If you are using the Zen Cart Search Engine Friendly URLS Contribution, this still can be added as well (it’s not automatically included in the module, you have to add it yourself). In that case, you simply add the following to the bottom section of the .htaccess file that came with the module install.

RewriteCond %{HTTP_HOST} ^yourdomainhere(.*)
RewriteRule ^(.*)$ http://www.yourdomainhere.com/$1 [R=301,L]

The code above will 301 redirect the non-www version to the www version. Remember to replace “yourdomainhere” with your own domain name.

If you use the non-www version use this code

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yourdomainhere.(.*)
RewriteRule ^(.*)$ http://yourdomainhere.com/$1 [R=301,L]

The code above will 301 redirect the www version to the non-www version. Remember to replace “yourdomainhere” with your own domain name.

So now you should know why it is important to be consistent in your naming conventions. A slight oversight could be costing your Zen store valuable Page Rank.

Got a different method to achieve the same effect? Let me know.

  Don't miss a single tip! Subscribe to my RSS feed.

How to Customize Home Page META Descriptions and Why You Should Consider It

June 2, 2007 by Eric  
Filed under Zen Cart Optimization

I found a question like this in the forums recently, and noticed there have been a number of people asking it. The question asked is “How do I change / customize the META tag description for my Zen Cart home page?

In case you aren’t aware of it, the “default” META description for the home page of your Zen Cart store basically lists the “title” you have given to your site, and then follows that with a list of all the keywords you have entered in your language file. So, what you end up with is something that looks like this:

My Store Name - keyword1, keyword2, keyword3, keyword4, keyword5, etc…

Not very “nice” looking is it? Well, as with all things “conversion” related, the “conversion” process starts from the minute a potential customer views any information about you.

Why is that important?

Well, if you want to increase conversion, you need “qualified visitors”. Qualified visitors come from various sources, one being Organic Search results.If it were “paid search” (PPC) ads we were running, would we pay money for our ad to say something this? I don’t think so (unless you had money to waste and really didn’t care about increasing sales).

So then, why should we settle for our “Organic Search Ad” (because in reality, that IS what you should think of your search listing as) to say it? Well, the answer is we shouldn’t!

Let me put it this way. If you were searching for “cell phones” on the the Internet, and you came across a number of search listings that looked like this (I’ll show just 2 entries as an example):

Cellular Phone Central - We have the best prices on cell phones from LG, Motorola, Samsung and more. Free shipping and calling plans for all orders.

My Cell Phone Store - cell phones, cellular plans, lg, motorola, samsung, phones, calling cards, wireless, verizon

Which would “prompt you” more to click it? The vast majority of Internet users would click the first one as it is more descriptive in nature and tells at least a bit more about what they can expect when they get to the site. It also gives them reason to click by stating a few direct customer focused benefits (very important if you want qualified traffic).

How do you change it?

So having stated that, the question of “how to change your home page META description in Zen Cart” becomes much more important! How you change it as follows:

Copy the file:
/includes/modules/meta_tags.php

to your templates and overrides directory:
/includes/modules/your_template_dir/meta_tags.php

Find this code:
// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
case 'advanced_search':

And change to this:

// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'MY HOME PAGE');
define('META_TAG_DESCRIPTION', 'This meta tag is showing on my immediate home page to my site');
define('META_TAG_KEYWORDS', 'keywords each go here');
break;
case 'advanced_search':

Then edit it to read as you want the tags to read for the Home page.

Thanks to Linda over at the Zen forums for answering this one for everybody.

  Don't miss a single tip! Subscribe to my RSS feed.

Next Page »