Ikool’s Blogbed

Fix of unable to update Product details in WP e-commerce

After playing with WP e-commerce for sometime and fixing some issues (see Incorrect URLs for images, css and js files in Products 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 can’t really update product details such as product name, description, product tags, and price and stock control after a product is added.

Let’s take a look at what the issue is. If you check your apache log for your site, then you will notice there is an error message regarding the update SQL query statement used to update the product details as shown below:

[Tue Jun 18 12:11:34 2008] [error] [client IP-ADDRESS] WordPress database error Incorrect integer value: '' for column 'brand' at row 1 for query UPDATE `wp_product_list` SET `name` = '9113 - Retractable ball pen', `description` = 'Plastic retractable ball pen', `additional_description` = '', `price` = '0.70', `pnp` = '', `international_pnp` = '5', `brand` = '', quantity_limited = '0', `quantity` = '0', `special`='0', `special_price`='', `display_frontpage`='0', `notax`='1', `donation`='0', `no_shipping` = '0' WHERE `id`='1' LIMIT 1 made by include, referer: http://blog.sdu2.hyperion.com/wp-admin/admin.php?page=wp-e-commerce/display-items.php

The error specifically points out that database error Incorrect integer value: '' for column 'brand' Continue reading


June 24, 2008 Posted by | How Tos, Wordpress Tips, WP E-Commerce | , , , , | 11 Comments

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 | , , , , , | 8 Comments

Fix of Settings menu on WP e-commerce’s Products admin page

WP e-commerce plugin is a wonderful e-commerce plugin which enables WordPress to serve as a shopping site. However, you may notice there is a weird behavior on its Products admin page, the popup menu sitting behind the Product Details label after you press the Settings button as shown in this image

Here is how to fix the behavior:

Continue reading

June 18, 2008 Posted by | How Tos, Wordpress Tips, WP E-Commerce | , , | 3 Comments

Incorrect URLs for images, css and js files in Products page of WP e-commerce plugin

After adding a few products with photos to one of the newly defined categories and following the steps as stated in Tips on how to reset default category in WP e-commerce plugin’s admin panel, I am able to see the products listed in the page but none of them with the uploaded photos. This really puzzled me for a while, and I even debugged the code for sometime. However, it turns out e-commerce plugin producing incorrect URLs for images, css and js files included by the plugin, these URLs are in the format of system directory, such as C:\tools\wordpress-2.5.1\wp-content\….. Once the root cause of the issue is found, the fix is a bit easier.

Here I am providing the fixes so that folks who have the similar issues will benefit from it. Continue reading

June 15, 2008 Posted by | Technology, Wordpress Tips, WP E-Commerce | , , , , , , , , , | 23 Comments

Tips on speeding up load time of WP e-commerce plugin in Admin Panel

I have to say WP e-commerce solves a big problem for so many of us who want to set up an online shopping site. It’s so lovely to have it around. But I have to admit that accessing e-commerce menu in administration panel is a headache, especially when web server is on a slow network. Therefore, I try figuring out how to speed it up. Here is what I noticed:

  1. The plugin tries to load feeds from http://www.instinct.co.nz/feed by making the following call (display_log.php):

    You can just comment out this line if you want. This works for me in my development environment.

    Continue reading

June 14, 2008 Posted by | Wordpress Tips, WP E-Commerce | , , , , , , | 1 Comment

Compatibility issue of Thickbox and jQuery in WordPress when both NextGen Gallery and WP e-commerce present

Both jQuery and Thickbox have different versions, and WordPress and its plugins may use different versions of jQuery for different plugins since plugin engineers basically work on their parts without paying much attentions to others’. I checked my installation of WordPress 2.5.1 and it has jQuery 1.2.3 and Thickbox 3.1. However, when you install other plugins which might use a fairly new jQuery such as 1.2.4, what happens in this case is they conflict, some of the features may not work at all, such as Fix of issues with old version of jQuery in WordPress 2.5.1 when using FeedWordPress. In the case of having both NextGen Gallery and WP e-commerc, you may even see what I saw as depicted in this image. The problem gets even worse when the plugins are using Thickbox because different versions of Thickbox will only work perfectly with their corresponding versions of jQuery:

Continue reading

June 14, 2008 Posted by | Wordpress Plugins, Wordpress Tips, WP E-Commerce | , , , , , , , , | 9 Comments

Tips on how to reset default category in WP e-commerce plugin’s admin panel

The issue that first time users of WP e-commerce will always encounter is “products page” doesn’t show any products added so far, the reason for that is because you might choose different product category instead the default category. Then the question becomes “how do we set Wp e-commerce’s default category”, here is how you can do it in WP e-commerces 3.6.6 with WordPress 2.5.1: Continue reading

June 13, 2008 Posted by | Wordpress Plugins, Wordpress Tips, WP E-Commerce | , , , , , , | 1 Comment

No products showing on WP e-commerce’s (3.6.6) “Products Page” even there are a few added

Installed wordpress 2.5.1 out of the box, and have it running for quite sometime. Installed WP e-commerce 3.6.6 yesterday, and added a new product group and a few new categories while leaving the default categories and brand untouched, everything works fine so far except that you can’t really delete the newly added categories. As a side note, the “Product Groups” page is confusing and not self-explaining, hope someone will put a meaningful explanation or help on the page.

Then added a few products and associated them with the new product categories, and go to “Products Page”, all I see is:

Category Loading Updating…
There are no items in this category.

Continue reading

June 12, 2008 Posted by | WP E-Commerce | , , , , , | 5 Comments

Javascript issue and fixes of WP E-commerce plugin (3.6.6) in WordPress (2.5.1) admin panel

After reading WP e-commerce plugin’s documents and some online articles/blogs, I started to install WP e-commerce 3.6.6 (the latest version as of today) on my local wordpress (2.5.1). And I tried to add one product but I keep getting the following javascript error:

“catagorylist” is not defined

I tried to find out a solution from WP e-commerce’s forum, unfortunately there is no one reporting this issue at all. So I am wondering that most of us are not using the latest version of the plugin, so I dig into the code and figure out the plugin is using the latest version of jQuery, I am documenting this here for myself’s later use just in case I forget it and also throw this out so that others can also benefit, so here is what I did to fix the issue: Continue reading

June 12, 2008 Posted by | How Tos, WP E-Commerce | , , , , | Leave a comment

Collection of articles on setting up an e-commerce site with WordPress and WP e-commerce

I’ve been hunting for an ecommerce plugin of WordPress for my own product site which is still under construction now, and am looking around for the best wordpress e-commerce plugins available for quite sometime, and so far it appears that the WP e-Commerce plugin by Instinct Entertainment is the one looks much promising. Here is a list of valuable articles that I found useful:

an industrial strength elegant easy to use fully featured shopping cart application suitable for selling your products, services, and or fees online.

Continue reading

June 11, 2008 Posted by | How Tos, WP E-Commerce | , , , , , | 1 Comment