Ikool’s Blogbed

Tips on display categories in WP ecommerce

There are a few ways to enable WordPress e-commerce plugin to display categories. Some of them are not so obvious to be noticed. Well, you have to bear with that since it’s open source world, what can you expect more. Most of the time we have to dig into the code to figure things out. And I am hoping my finding will help someone else out there. My environment (Windows XP, WordPress 2.5.1 and WP e-commerce 3.6.6) may be different from yours, therefore, the tips here may not apply to yours and you have to use your own judgement, but you may still learn something useful here though. Keep on reading.

Tip #1: Add [showcategories] to your post or page wherever you want it to go, WordPress engine will figure out how to replace this by the corresponding product category list

Tip #2: Calling nzshpcrt_display_categories_groups() function directly. This function is defined in products_page.php. There are a few references to it in this release. Here are:

wp-e-commerce\products_page.php(45): function nzshpcrt_display_categories_groups() {
wp-e-commerce\products_page.php(101): echo nzshpcrt_display_categories_groups();
wp-e-commerce\products_page.php(167): echo nzshpcrt_display_categories_groups();
wp-e-commerce\wp-shopping-cart.php(2015): $output = nzshpcrt_display_categories_groups();

Line numbers may be off a bit, so in this case you will need to just look around. It should not be a big problem

Tip #3: Calling show_cats_brands() directly. Well, this is the core to showing categories. You definitely need to take a look at this function if your changes won’t work. This function is defined in show_cats_brands.php, and here is the signature:

function show_cats_brands($category_group = null , $display_method = null, $order_by = 'name')


June 23, 2008 - Posted by | How Tos, Wordpress Tips, WP E-Commerce | , , , , ,


  1. […] page of WP e-commerce plugin, Fix of Settings menu on WP e-commerce’s Products admin page and Tips on display categories in WP ecommerce), I am able to display products and categories. But I also notice an issue which is users […]

    Pingback by Fix of unable to update Product details in WP e-commerce « Ikool’s Blogbed | June 24, 2008 | Reply

  2. I used the [showcategories] on the products page. Except when I click the links directly on the page it comes up with a “Not Found” page. How can I fix this?


    Comment by Sonja | August 2, 2008 | Reply

  3. I also have the same problem. The categories are displayed but when i click on the link, it doesn’t go anywhere.

    Comment by kat | August 26, 2008 | Reply

  4. this doesn’t work for me – adding [showcategories] produces this error, even when trying to save the page:

    Call to undefined function nzshpcrt_display_categories_groups()

    Calling it directly produces the same result and calling show_cats_brands() produces nothing. Am I missing something?

    Comment by Jeromy | October 30, 2008 | Reply

  5. Hey, Ikool,

    Not sure I quite know what to do with this function yet but I had been searching for where to find it for a couple of hours in the WP Ecomm forums and on Google. Thanks so much for the tip on where it is!

    David Mihm

    Comment by David Mihm | November 3, 2008 | Reply

  6. Hi
    I thought this post was the answer to my issue, but maybe not.
    I have an problem with categories. I can add products, but not assign i9t to any categories.
    I am using the latest version of wp ecommerce and wordpress
    any help?

    Comment by Scooterschalk | May 16, 2009 | Reply

    • Scooterschalk,

      Did you find an answer? I’m having the same problem.


      Comment by Jen H. | July 9, 2009 | Reply

  7. I have the same problem as the previous poster. Also latest ecommerce and WP. I can’t assign my products to any categories.

    I happened to delete the lone default category, and now I can find no way to make any new categories, restore the default category, or assign products to categories.

    I have completed all my variations, payment gateway settings, lots of product additions etc., so I really don’t want to have to reinstall. Very frustrating. I cannot find any documentation on this anywhere online. Does anybody have advice? Thanks!

    Comment by Jen H. | July 9, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: