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:
1 2 3 4 5 6 | 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):
1 | define('TXT_WPSC_VISITTHESHOP', 'Visit the Shop'); |
I would then change it to this:
1 | 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:
1 | echo $google_cart->CheckoutButtonCode($google_button_size); |
You will just comment that line out so that it looks like this:
1 | //echo $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:
1 | define('TXT_WPSC_GOTOCHECKOUT', 'Go to Checkout'); |
You will edit that line to look like this:
1 | 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:
1 2 3 4 | $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')."'?phpMyAdmin=7FErtFP1sUzlru8bAWwYQNZEag7>".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:
1 2 3 | $output .= "<a href='".get_option('shopping_cart_url')."'?phpMyAdmin=7FErtFP1sUzlru8bAWwYQNZEag7>".TXT_WPSC_GOTOCHECKOUT." # </a><br />";$output .= "<a href='".get_option('product_list_url').$seperator."category=?phpMyAdmin=7FErtFP1sUzlru8bAWwYQNZEag7 # ".$_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:
1 2 3 4 5 6 | 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.
1 2 3 4 5 6 7 8 | 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:
1 2 3 4 5 6 7 8 9 10 | #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:
1 2 3 4 5 6 7 8 9 10 | #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…

Alissa –
If the site you’re talking about is http://rulerman.com then it seems to be working fine. Otherwise, can you post a URL to the site that you’re having issues with and I’ll take a look.
Hi Shayne,
I have a client that wants the shopping cart in two locations. One being the hardcoded typical HOME link in the menu. How do I add that? I’ve added it to the POST page but when I delete the hardcoded Home link I don’t know how to tell the Post (Store) link to go back to HOME. Does this make sense? Plus if I do take out the Hardcode it won’t show the Flashfader.
Here is the link.
http://petalfreshpure.com/
Stef,
I’m not real clear on what you’re looking for…you want a “Home” link in the main navigation?
It would probably be best to fill out the contact form and include a WP login and FTP access and full instructions on what you’re wanting and I can take a look at it for you.
Shayne,
these tips are fantastic. I have managed to change my buy it now sign and have also solved an image showing problem through css having stumbled across someone from this blog. Brilliant.
One final thing that you will be able to see in my ‘book now’ page where my products are. The ‘Price:’ is on the wrong side of the actual figures! Is there anything I can tinker with to sort this problem out?
Kind Regards
Richard
I have several problems that I could use help with, but the most pressing one is that I have a product called Gloves that has two types of variations (style and color), but not all styles have all colors.
I don’t want to break them up and create each style as a different glove, so how do I get the drop down boxes to only offer properly associated colors with their styles?
Richard,
You can look in “wp-content/uploads/wpsc/themes/” and find the WP Ecommerce theme you’re using, then look in either “products_page.php” or “single_product.php” (or both) and do a search for “Price” and you’ll see where it’s coming in and you can rearrange where it’s getting called in.
David,
Unfortunately, I think that’s the only way you can do it currently. I do know Instinct is working on new ways to handle variations which will help what you’re wanting to do…just not right at the moment.