OpenCart Tips

 

I've decided to accumulate my OpenCart tips and tricks here. 

 

Replacing the [+] button on the home page
Posted 7/22/10 (OpenCart, version 1.4.8b)

Version 1.4.8b of OpenCart has Add buttons on the home page that look like a plus sign in a box:  [+].  The [+] button is the same height (in pixels) as the price to the left of it, and that's apparently why the designers made such a small button.

Below are some buttons that you can substitute for the [+] button.  To save a button, right click it and then save it to your hard drive.

              

If you have the default template, you will need to substitute the button you saved for this button:

catalog/view/theme/default/image/button_add_small.png

Remember to change the name of my button to "button_add_small.png".  It is a good idea to back up or rename the original button_add_small.png file first, although you can always get it from the OpenCart zip file.

Now, go to this file -- catalog/view/theme/default/stylesheet/stylesheet.css -- and look for the code below:

.button_add_small, a.button_add_small:visited {
margin-top: 3px;
background: url('../image/button_add_small.png') no-repeat left center transparent;
padding:5px;
text-decoration: none;
cursor:pointer;

In place of 5px, type 15px.  If the button is being cut off on the right, go back and try a larger number.

Your new Add or Buy button should display correctly now (although you may have to reload your cart page several times to make it show).


Changing the "Confirm Now" button
Posted 7/23/10 (OpenCart, version 1.4.8b)

For various reasons (usually because the page isn't updating quickly enough), my customers sometimes click the "Confirm Now" button (at the end of the checkout process) more than once, and end up placing more than one order and paying more than once.  The best solution I've found is to change the text on the Confirm Now button to "Confirm Now - CLICK ONCE".  To do that, modify this file and modify the appropriate line:

catalog/language/english/english.php

Note that if you add too much text, thereby making the button very long, the first part of the button won't display properly.  You can place a small order on my site to see what it looks like (but don't confirm the order):

www.purebeads.com/catalogue/


Changing the color of the header bar
Posted 7/__/10 (OpenCart, version 1.4.8b)

[to be filled in]


Cart getting stuck on "Please Wait" when "Confirm Order" is pressed
Posted 7/26/10 (OpenCart, version 1.4.8b)

If your customers who use credit cards are placing multiple orders, it may be because of a bug in version 1.4.8b.  The bug causes the cart to get stuck on the "Please Wait" prompt when they click "Confirm Order", so they then click the button again and end up placing more than one order.

The fix for this problem is in the forum here:

http://forum.opencart.com/viewtopic.php?p=79068#p79068

You should only need this fix if you downloaded 1.4.8b shortly after it was released.  (I am assuming they have since incorporated this fix into the download file.)