I recently helped a customer who was not able to set up an account on an Interspire store in Internet Explorer because the field for selecting a state/province was not displaying, so he could not select the correct one, and yet it was a required field – so he could not create an account. Here is how I solved the issue:
1) Make the “State/Province” field NOT required
Log into the PHPMyAdmin for the Interspire site and open the formfields table. In the formfieldlabel column, you will see two entries for “State/Province.” Open each one, and change the value for formfieldisrequired and formfieldisimmutable from 1 to 0. Save your changes. This makes the “State/Province” field an optional field and not a required field anymore.
2) Make sure the “State/Province” field is displaying in Internet Explorer
In looking at the source code of the Create Account page, this is the html for the State/Province field:
As you can see, the style “display:none” was being added to the field. In order to fix this, I added this block of code to the stylesheet for the site:
#FormField_12 {
display:block !important;
}
Note: You may need to change the ID for the code block above if it is different than the ID in your Create Account page.
Save your changes, refresh the page in Internet Explorer and – Voilà! Now customers can both see the State/Province and not fill it out if it is not relevant to them.
When I first installed the WP-Ecommerce plugin on a website this morning and tried to go to the products page, I got this error:
<strong>Warning</strong>: array_merge() [function.array-merge]: Argument #1 is not an array in <strong>/public_html/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php</strong> on line <strong>622</strong>
Thankfully, it is actually very easy to fix this error. All you need to do is add (array) to the correct line of code in the plugin’s functions.php file.
Find this line in your wp-e-commerce/wpsc-core/wpsc-functions.php file:
Using a dropdown menu rather than a text box to apply different discounts to your PayPal button is actually very simple.
All you need to do is change this code:
<input type = "text" size = "10" name = "coupcode"; />
Here are the codes you can use to create a coupon or discount for a set dollar amount for your PayPal buttons (as opposed to a percentage amount, which I covered in a previous post on how to create a coupon for your PayPal button).
Make sure you use either your PayPal email address or your Merchant account ID number for this line:
<input type="hidden" name="business" value="" />
Next, we will create the Javascript file we need. Here is the code I use:
<!--
var discnt = 0; // no default percent discount
var coupons = new Array ( // place to put coupon codes
"coup1", // 1st coupon value - comma seperated
"coup2", // 2nd coupon value - add all you want
"coup3" // 3rd coupon value
);
var coupdc = new Array ( // place to put discounts for coupon vals
5,
10,
15
);
var coupval = "(blanket)"; // what user entered as coupon code
function ChkCoup () { // check user coupon entry
var i;
discnt = 0; // assume the worst
for (i=0; i<coupons.length; i++) {
if (coupval == coupons[i]) {
discnt = coupdc[i]; // remember the discount amt
alert ("This is a valid promo code! \n\n" + "$" + discnt +
" discount now in effect.");
return;
}
}
alert ("'" + coupval + "' is not a valid promo code!");
}
function Dollar (val) { // force to valid dollar amount
var str,pos,rnd=0;
if (val < .995) rnd = 1; // for old Netscape browsers
str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape
pos = str.indexOf (".");
if (pos > 0) str = str.substring (rnd, pos + 3);
return str;
}
function ReadForm (obj1) { // apply the discount
var amt,des;
amt = obj1.baseamt.value*1.0; // base amount
des = obj1.basedes.value; // base description
if (discnt > 0) { // only if discount is active
amt = Dollar (amt - (discnt));
des = des + ", " + "$" + discnt + "dis, COUP = " + coupval;
}
obj1.amount.value = Dollar (amt);
obj1.item_name.value = des;
}
//-->
Here is a link to the Javascript file that you need – http://thelibzter.com/discount2.js. Feel free to right-click and save that file to your computer rather than creating your own Javascript file if you wish.
To add the passwords you want to use, change the names coup1, coup2, and coup3 to the passwords that you want to use.
To add the discount amounts, change the 5, 10, and 15 to the percentage that you want the discounts to be for.
The final step, which I use to make the discount button more secure, is to pack part of the Javascript code. I copy the line of the code that contains my discount passwords:
var coupons = <strong>new</strong> Array ( // place to put coupon codes "coup1", // 1st coupon value - comma seperated "coup2", // 2nd coupon value - add all you want "coup3" // 3rd coupon value );
And paste it into Dean Edward’s packer – http://dean.edwards.name/packer/. Click “pack” and then copy the packed code and paste it into your Javascript file in place of the line above, which declared our passwords. This makes it more difficult for people to see your passwords.
Save the Javascript file as discount.js or whatever you want it to be called. Upload it to your server. Add this line of code to your website’s
Here is the simple way I have found to sell affiliate products in your Interspire Shopping Cart store.
First, get the code that your affiliate provides you to add the affiliate products to your website.
Next, go to Add a Product in your Interspire admin panel.
Click the “HTML” button above the box where you type in the product description:
Paste the code from your affiliate into the window that pops up.
Scroll down in the pop up window and click the “Update” button.
You should now see the affiliate product in the Product Description box.
If there is an image for the product, right-click it and save it to your computer. Then delete it from the Product Description and add the image as you would add an image to any other product in your store.
Copy and paste the product name into the correct field, put the product in the correct category on your site, and add the price to the correct field.
Once you have the product listed the way you want, scroll down and UN-check the box next to “Allow customers to purchase this item.”
Save the product and go look at in in your store. It should look just like any other product you would add to the store, except that in order to purchase it, people have to click the affiliate link which you pasted into the product description (this way their clicks from your website to the affiliate site will be tracked, since you are using the code that the affiliate site gave you).
Let me know if you have any issues with this or any questions about it.
Make sure you add the correct value (either your PayPal email address or your Merchant account ID number) to this line:
<input type="hidden" name="business" value="" />
If you want to force people to use a discount code before adding an item to their cart, make sure you add this line of code to the http://thelibzter.com/discount.js. Feel free to right-click and save the file to your desktop so that you can edit it and upload it to your own site.
To add the coupon codes you want to use, change the names coup1, coup2, and coup3 to the passwords that you want to use.
To add the discount amounts, change the 5, 10, and 15 to the percentage that you want the discounts to be for.
You will want to make sure that the button amount is higher than any of the discounted prices. For instance, if you want to offer three different discounts – one which reduces the price to $750, one which reduces is to $725, and one which reduces it to $700 – you will want to make sure that the amount of the original button is at least $750, and then add the discounts for the correct percentages to bring the price down to the amount you want.
The final step, which I use to make the discount button more secure, is to pack part of the Javascript code. I copy the line of the code that contains my discount passwords:
var coupons = <strong>new</strong> Array ( // place to put coupon codes "coup1", // 1st coupon value - comma seperated "coup2", // 2nd coupon value - add all you want "coup3" // 3rd coupon value );
And paste it into Dean Edward’s packer – http://dean.edwards.name/packer/. Click “pack” and then copy the packed code and paste it into your Javascript file in place of the line above, which declared our passwords. This makes it more difficult for people to see your coupon codes.
Save the Javascript file as discount.js or whatever you want it to be called. Upload it to your server. Add this line of code to your website’s
Here is the easiest way I have found to add flyout or drop down menus to a particular panel in an Interspire shopping cart’s template.
First, sign into the website’s admin panel.
Go to Settings -> Store Settings -> Display.
In the box next to Category List Depth, change the number to the number of levels you want to display in the flyout or drop down menu.
Now, go to Store Design and then click Browse Template files.
In your website template’s style.css file, add this code:
.Left #SideCategoryList li:hover, .CategoryList li:hover, .CategoryList li.Over {
background: #746755;
}
.Left #SideCategoryList li:hover a, .CategoryList li:hover a {
color: #fff;
}
.Left #SideCategoryList li ul, .CategoryList li ul {
display: none;
padding: 0 0 9px 0;
-moz-border-radius-bottomleft: 17px;
-moz-border-radius-topright: 17px;
-webkit-border-top-right-radius: 17px;
-webkit-border-bottom-left-radius: 17px;
width: 160px;
position: absolute;
}
.Left #SideCategoryList li:hover ul, .CategoryList li:hover ul {
display: block;
position:absolute;
margin-top:-15px;
left:160px;
width:160px;
}
.Left #SideCategoryList li:hover li, .CategoryList li:hover li {
float: none;
background: #f0eee8;
}
.Left #SideCategoryList li:hover li a, .CategoryList li:hover li a {
color: #444;
font-size: 14px;
text-transform: none;
font-style: normal;
border-top: 1px solid #f0eee8;
border-bottom: 1px solid #f0eee8;
}
.Left #SideCategoryList li li a:hover, .CategoryList li li a:hover {
background: #746755;
color: #fff;
border-color: #fefaf3;
}
.Left #SideCategoryList li:hover, .CategoryList li:hover {
background: #746755;
}
.Left #SideCategoryList li:hover a, .CategoryList li:hover a {color: #fff;}
.Left #SideCategoryList li ul, .CategoryList li ul {display: none;padding: 0 0 9px 0;-moz-border-radius-bottomleft: 17px;-moz-border-radius-topright: 17px;-webkit-border-top-right-radius: 17px;-webkit-border-bottom-left-radius: 17px;width: 160px;position: absolute;
}
.Left #SideCategoryList li:hover ul, .CategoryList li:hover ul {display: block;position:absolute;margin-top:-15px;left:160px;width:160px;
}
.Left #SideCategoryList li:hover li, .CategoryList li:hover li {float: none;background: #f0eee8;}
.Left #SideCategoryList li:hover li a, .CategoryList li:hover li a {color: #444;font-size: 14px;text-transform: none;font-style: normal;border-top: 1px solid #f0eee8;border-bottom: 1px solid #f0eee8;}
.Left #SideCategoryList li li a:hover, .CategoryList li li a:hover {background: #746755;color: #fff;border-color: #fefaf3;}
This code will add a flyout menu to the Category panel in the left sidebar of your website. You can change the name of the panel in the codes if you want to apply the flyout menu to another panel.
Next, you will want to edit the styles above to match the design of your own site.
And that’s all you need to create flyout or dropdown menus for the sidebar of your Interspire shopping cart template!
Let me know if you run into any issues or have any questions.
I have used the WP E-commerce plug in for several WordPress online stores that I have developed for clients, and one thing that I have run into more than once is this: the names of the carriers when you calculate USPS shipping rates often have an unsightly line of code in them: