So, I was asked to come up with a “Top 10″ tips and tricks for the Wordpress plugin WP-Ecommerce. Well, there are definately more than 10, but I decided to post my top 5. So without further ado, here they are:
Tip #1: You want to change the “add to cart” button that appears on your shopping cart.
Well, first you’ll want to make sure that you choose “iShop” for your theme in “Shop Settings”. That will place an actual button on your cart. Then to change that image, you will navigate to “wp-content/plugins/wp-shopping-cart/themes/iShop/images”. In that directory you will see a “buy_button.gif” and you will replace that with whatever “add to cart” button you’d like. Step 2 of this process is to adjust the stylesheet so that it will reflect the correct image size of the new image you’ve uploaded (unless of course, the new image is the same size as the old; then you can stop here).
Locate “iShop.css” and find the following code:
input.wpsc_buy_button{
background-image: url(images/buy_button.gif);
border: none;
width: 80px;
height: 30px;
}
You will then change the width and height to reflect the size of your new image. Save and upload and you’re all done.
Tip #2: Change wording in your shopping cart.
Most all of the “text” on the site that involves the shopping cart can be found in the language file here:
“wp-content/plugins/wp-shopping-cart/languages/EN_en.php”. In that file you will find everything from “Visit the Shop” to “PnP” (which most like to change to “Shipping”) to the sentence that reads on the checkout page about “having your credit card handy”. You can change these phrases to whatever you’d like, but just remember that when editing this text that you leave the quotes in place, otherwise your site will break!
So here’s an example…I want to remove the words “Visit the Shop” from my sidebar shopping cart. So I locate the line in the language file (it’s on line 174):
define(’TXT_WPSC_VISITTHESHOP’, ‘Visit the Shop’);
I would then change it to this:
define(’TXT_WPSC_VISITTHESHOP’, ”);
And you notice that I left in the quotes, but removed the text. That’s it for changing or removing text.
Tip #3: The Google Checkout button.
If you’re using Google Checkout, you’ll notice that on the checkout page there are 2 Google Checkout buttons. One above the customer information fields and one below. The one that is placed at the top doesn’t really function as it needs the information below it to be filled out first, so the best thing to do is just remove that image and leave the one at the bottom.
So to do this, you will navigate to “wp-content/plugins/wp-shopping-cart/shopping_cart.php” and on line 341 you will see this code:
echo “<br>”.$google_cart->CheckoutButtonCode($google_button_size);
You will just comment that line out so that it looks like this:
//echo “<br>”.$google_cart->CheckoutButtonCode($google_button_size);
Save and upload and that should remove that top Google Checkout button.
Tip #4: Make your “checkout” link bigger and move it.
So on the sidebar cart, some people have requested to have the “Go to Checkout” link bigger and placed above the “Empty Your Cart” link. Here’s how we accomplish that:
First we’ll make the text bigger, so you will navigate to “wp-content/plugins/wp-shopping-cart/languages/EN_en.php” and on line 171 you will see the following:
define(’TXT_WPSC_GOTOCHECKOUT’, ‘Go to Checkout’);
You will edit that line to look like this:
define(’TXT_WPSC_GOTOCHECKOUT’, ‘<font size=”3″>Go to Checkout</font>’);
You can obviously change the “3″ to whatever size you would like to fit your site. Then you will want to place it above the “Empty Your Cart” link, and we’ll do that by navigating to “wp-content/plugins/wp-shopping-cart/shopping_cart_functions.php” and on line 337 you will see this:
$output .= <ahref=’”.get_option(’product_list_url’).$seperator.”category=
“.$_GET['category'].”&cart=empty’ onclick=’emptycart();return false;’>”.TXT_WPSC_EMPTYYOURCART.”</a><br />”;
$output .= “<a href=’”.get_option(’shopping_cart_url’).”‘>”.TXT_WPSC_GOTOCHECKOUT.”
</a><br />”;
And all you will do is take the bottom line that calls to show the “Go To Checkout” link and move it above the “Empty Your Cart” link, so it will then look like this:
$output .= “<a href=’”.get_option(’shopping_cart_url’).”‘>”.TXT_WPSC_GOTOCHECKOUT.”
</a><br />”;$output .= “<a href=’”.get_option(’product_list_url’).$seperator.”category=
“.$_GET['category'].”&cart=empty’ onclick=’emptycart();return false;’>”.TXT_WPSC_EMPTYYOURCART.”</a><br />”;
And that’s it for that.
Tip #5: Modifying your sidebar cart and notification look and feel.
So if you have your cart in your sidebar, you’ll notice that it’s pretty plain looking. There is an easy fix for that and the possibilities are up to you as far as how much you want to style it. First you’ll navigate to your theme’s css file. In that you’ll find the following code:
div#sliding_cart{
margin: 0px;
padding: 0px;
background: none;
border: none;
}
You’ll notice it’s very simple and plain right now, but there are many things you can do to change it. Below I will list an example of how you can change it to have a border around the cart, a background color and a larger font.
div#sliding_cart{
margin-left: 0px;
padding: 0px;
color:#000000;
background: url(’http://www.yoursite.com/image.jpg’);
border: 1px solid #000000;
font-size: 12px;
}
Again, there is a lot more you can do if you would like and know enough about CSS, but this is a simple example.
Next, if you have the “Fancy Notification” enabled, this will show you how to style it. In the same CSS file you will find this:
#fancy_notification{
position: absolute;
top: 0px;
left: 0px;
background: #ffffff;
border: 4px solid #cccccc;
display: none;
height: auto;
z-index: 9;
}
This has all the elements in place that most people want, but feel free to change the border color/width and background color. You can even load in a background image if you’d like by editing the code to look like this:
#fancy_notification{
position: absolute;
top: 0px;
left: 0px;
background: #ffffff url(’http://www.yoursite.com/image.jpg’);
border: 4px solid #cccccc;
display: none;
height: auto;
z-index: 9;
}
You’ll notice that I just gave a direct path to the background image, and it will show up in your notification box.
There are SO many other things you can do to style your cart, but these are a few good examples. If you have any questions about these or other styling issues, feel free to contact me over here.
So, until next time…


April 27th, 2008 at 11:11 pm
Thanks for those.
Is there a simple way for wp-shopping cart to pick up the blog Page Name and add it to the Product Name.
I have put the product list onto my single.php page but can’t find a way to add the name before the product and of course continue to show it throughout the order process.
Blog is a Photo Gallery.
May 10th, 2008 at 4:32 am
Thanks for this Shayne, Very simple and clear… easy to understand… Instinct should commission you to write a WP e-Commerce Guide??? Or at least consult on it… It would save on a lot of frustration in the forum and they could even sell it as a download and make a few quid too…
Anyway this page goes in the bookmarks… Cheers Shayne…
June 1st, 2008 at 7:54 am
thanks for the excellent tips. The WP shopping cart is one of the shopping carts that actually work with Google Checkout . Other carts I have tried say they are compatible , but they aren’t. I would like more tips about improving the display of product images in the category pages and how to change the standard page titles for categories and products
June 11th, 2008 at 3:31 pm
[...] Top 5 WordPress Ecommerce Tips [...]
June 30th, 2008 at 1:07 am
I found it to very informational, it will certainly provide help in programming. This list will be very useful in the future.
Got to bookmark this one!
July 11th, 2008 at 12:53 pm
Very useful for a very powerful plugin!
August 23rd, 2008 at 1:26 am
Hi..
I found blank page with IE browser. Everything is Ok with Firefox..
Can you help me to solve this problem?
August 25th, 2008 at 12:08 am
I’d like to ditto dewatech’s post.
My online shop page displays things as it should in IE 6. When I click on a product, the product page appears blank in the “product-display” div.
Looking at the source for the page reveals that everything has been loaded - but for some reason, the images, text, buttons, etc. for the product do not show up! Weird.
September 19th, 2008 at 8:55 am
I also get a blank page in IE when I try to go to the checkout. Same problems as above… Any idea why?
September 20th, 2008 at 3:36 pm
Hey Shayne!
Thank you kindly for all your help in the forums. You have helped me out tremendously.
One other question I’m hoping you can help me with. Right now I have a single product. I want to place a custom image on my home page that will add the product to my cart, but I cannot find help on this. If it is in your manual, just let me know and I will buy it today.
Thanks a million!
-Scott
October 3rd, 2008 at 4:00 am
Hi Shayne
I purchased the WP E-commerce bible a week ago and Ive been playing with the plug in ( version 3.6.8 RC1 ) and think I have it working .. I have a few issues that Ive posted on the Instinct forum..
but I was just wondering if you were going to update the bible with the advanced options feature in Adding a product.
or tell me where I can find out more about this option
Dan