WordPress Shopping Cart WP-Ecommerce Help
This is an ongoing post on trouble shooting WP e-Commerce. You’ll find solutions here to problems you’re encountering.
Adding products from WP e-commerce to non shop pages on your Website
One function that many WP e-commerce users would like to have is the ability to add a product from their store on a single page of their site with the use of a shortcode. To that end Ralf posted this solution:
To add a new shortcode to view a specific product you have to add
the following (dirty) function to ‘homepage_products_functions.php’
function nszhpcrt_product_tag($content = ”) {
global $wpdb;
if(preg_match_all(”/\[wpsc_product=([\d]+),*(full)?\]/”, $content, $matches)) {
foreach($matches[1] as $key => $product_id) {
$product[$key]['id'] = $product_id;
$product[$key]['display'] = $matches[2][$key];
$product[$key]['original_string'] = $matches[0][$key];
$output = single_product_display($product[$key]['id']);
$content = str_replace($product[$key]['original_string'], $output, $content);
}
}
return $content;
}
And you have to add the following new line (2316) to ‘wp-shopping-cart.php’.
add_filter(’the_content’, ‘nszhpcrt_product_tag’, 12);
After this you can place a shortcode [wpsc_product=xx] to each post.
WP e-Commerce 3.6.9 Editing Meta Tags
Beginning with WP e-Commerce 3.6.9 you can now add Meta Tags to your products. However, a user noticed that he couldn’t go back and edit these.
“when creating a product with meta-data it gets displayed correctly, but when trying to edit that product the meta-data fields cannot be changed (they don’t show up). The same goes for product tags.”
You have to delete line 415.
At line 350 you have to add
$custom_fields = $wpdb->get_results(”SELECT * FROM {$wpdb->prefix}wpsc_productmeta WHERE product_id IN(’{$product_data['id']}’) AND custom IN(’1′) “,ARRAY_A);
And line 361 have to change to
<textarea class=’text’ name=’custom_meta[$i][value]‘ id=’custom_meta_value_$i’>{$custom_field['meta_value']}</textarea>
There is also a HTML-Bug in line 373. Theres a missing </div> tag.
So you have to change this line to
</div></td></tr>”;
Credit goes to ralf for that one too.
404 Errors in WP e-Commerce with WordPress Version 2.6
WordPress created a new problem for WP e-Commerce when it introduced revisions in the release of WP 2.6. After this users started finding that they would get seemingly random 404 errors. The first thing you need to do is get the plugin Remove Revisions, install it and activate it. Here are the steps to take after you’ve done that.
1) In the admin panel click Manage.
2) Click Remove Revisions in the secondary panel
3) Click the remove revisions button in the panel
4) With the upper Menu still set to Manage click pages
5) Click catalog
6) Click HTML and copy what is there.
7) Delete the page
Click Write
9) Create a new page
10) Title it Catalog
11) Publish it
12) Click e-Commerce
13) Click Settings
14) Click Admiin
15) Go to bottom and click Update Page URLs
16) Check that the front side is working fine again
PayPal Unable to Process Payment Error
Using PayPal with WP-Ecommerce you’ll often find that on your first test trial (you should always test) you’ll get an error saying: “Return to Merchant. Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address.”
To fix this go to merchants/paypal_multiple.php
Find this line:
$data['address_override'] = ‘1′;
(should be line #46)
and delete it or comment it out.
Anyone know how to clear up this warning? Please leave a comment answer.
Warning: Invalid argument supplied for foreach() in /home/shopgree/public_html/wp-content/plugins/wp-shopping-cart/merchants/paypal_multiple.php on line 82
Warning: Cannot modify header information – headers already sent by (output started at /home/shopgree/public_html/wp-content/plugins/wp-shopping-cart/merchants/paypal_multiple.php:82) in /home/shopgree/public_html/wp-content/plugins/wp-shopping-cart/merchants/paypal_multiple.php on line 237
Adhamox answers this below in comments.

in the database, there is a table called “wp_cart_contents” make sure it has a column called ” files” if not, add it to the table structure. That should do it
cheers
Adham
Hey Adham,
Thanks for that. It worked like a charm.
Hi, hi. I’m having trouble with the PayPal payment processing. As above I’m getting a similar error (Please contact the merchant as the shipping address provided) but where here you mention shipping as the problem it’s the email address that’s returning me to merchant. Any ideas?
Maris, are you saying that when you arrive at PayPal you get an error that says “Please contact the merchant as the email address provided by the merchant is invalid” ?
I continue to get the “Sorry — You last action could not be completed.” Not sure what the deal is.
@ mark, what’s the website url?
anyone knows why doesn’t the paypal gateway option work when i activate google checkout gateway?
help!
I’ve been trying to implement this code, however the add to cart button is not working properly…it takes me to the main products page… any suggestions?
Elisa,
Which code are you trying to add?
I would like to bundle a few products together using one add to cart button. Does anyone know how to create a button that will send more than one product to the cart?
Thanks!
Doug,
I’ve not seen anything like this. One thing I’ve thought about in the past is a form where a shopper could click multiple products and then send them all at once to the cart, but I’ve not put any work into developing it.
Hello,
We are trying to work out the wp-ecommerce for a website both for the physical products and the digital downloadable products. The selling and the buying of the physical products is working fine but the downloadable digital products is not working at all. It’s does not provide the required links to download the product. Is there anyone to help me asap.
Look forward to hear some real help from you, guys.
Thanks,
Hola: utilizando el carrito de compras y el metodo de pago paypal estandar, me encuentro con el problema que al llenar los campos en la pagina de checkout, me da el valor correcto de los productos, pero cuando hago submit, en la pagina de paypal, aparece el producto con un valor menor, como si el programa le descontara algo antes de enviar a paypal. Veo la opcion de tax y esta en cero.
gracias de antemano por cualquier ayuda
Anyone knows how to get rid once and for all this widget.
I installed it to give it a try. It sucks royal. I uninstalled it. Now, I still show the ‘menu buttons’ of the shop in my blog. I CANNOT GET RID OF IT.
In my control panel there is no place to be found (the widget). But my page shows ‘residue’ of this garbage widget.
Thanks for any help.
You can reply to my email: support AT studiochristian DOT com
@Chris,
I assume by widget you mean plugin and that you’re referring to the whole wp e-commerce plugin.
1.Go to plugins page and deactivate plugin before uninstalling. Don’t skip this step!
2. Uninstall
3. Via ftp navigate to /wp-content/plugins/ and look for wp-e-commerce full path /wp-content/plugins/wp-e-commerce. Delete that file if it exists.
4. Repeat step 3 for wp-content/uploads/wpsc
That should solve your problem.
My shopkeeper preferes to work off the “order pending” email she receives… Has anyone figured out how to move the billing phone number up under the billing address, and add a few blank lines between billing and shipping address?
Having a problem, just got off the phone with Paypal, they say it’s not their problem, but it’s the WP Ecommerce plug in.
Whenever I add something to the cart, and then go to paypal, the price is always less on Paypal. I cannot find the problem. Go to my name to see it in action.
Please respond quickly if you can, thanks.
Don
Hi Don,
I went to test.fingerlakescopywriting.com and didn’t see any products on your products page so it’s impossible for me to have a look. The only thing I can think of at the moment would be if you had entered two prices one as a sales and then the regular price. At any rate I’ll need to be able to see this in action and might even need to look at your settings before I could give you much info.
I solved it, I never changed the default currency from New Zealand. It shows up with the right price.
Is there anyone using this with a Thesis theme?
Thanks,
Hi Don,
I am sure there are plenty of people using this with a thesis theme, why do you ask?
I have a WP e-commerce plugin problem I can seem to figure out.
I am using Paypal as my gateway on this site
http://www.avuvuzela.com/vuvuzela
its not finished as I have to finish testing it
And using the Paypal payments standard options and all seems fine.
I did a test from another paypal on one of the products, I lowered the price and just did a test buy. All seems fine but I have 2 questions.
1. After the transaction it went to this screen
which displays the page
“Error 404: Page Not Found Sorry, but you are looking for something t…hat isn’t here.Return to the homepage…”"
Where is the setting to make it either go back to the main page or some page after a transaction. I really dont want it going to that page, do you have any suggestions.
2. I am using paypal for another product site. how do I change the name of the paypal storefront to another shop
i.e. if you go to my site or straight to products page http://www.avuvuzela.com/vuvuzela/?page_id=3
then go to checkout after selecting a product. It displays the header for the other store I have.
Thanks
Gidday,
I am implementing a payment gateway for WP eCommerce and I can’t seem to get it to work.
I have to collect the CC number and Expiry date is collected so I have added these fields in a similar way to the PayPal Pro plugin. However whenever I submit the cart it simply returns to the cart page without any errors. If I remove these fields it seems to process the cart.
Any suggestions? Where do the cart form fields get validated?
cheers
David, thanks for all your help. I bought the Wp-Ecom Bible, and I have missing pages, so I’ve contact them. However, not sure if they will address these issues.
I have the Thesis theme, and was hoping to have the top navigation with the product categories (soaps, candles, home scenting, bath and body), but only pages are allowed to display on the top (except for the Products) page. Can I change this?
–
Also, having the categories and then a product category is very confusing. It took me a while to figure out the difference (not sure off hand, I’d have to commit it to memory). But I just figured out that I can have one of my widgets show the product categories, which is great, however, can I rename the product category pages??
I already have strong Google PR on some product categories, and would rather not lose them. Product pages themselves I know already I can change the urls, but product categories I do not see a solution.
Can you help with either or both of these?
Appreciated,
Don
@ David
You may want to have a look at the file wp-content/plugins/wp-e-commerce/merchants/paypal_pro.php
@Don,
I don’t think you’re going to be able to have the top nav be the product categories. I’ll be interested to hear what Shayne says. If he says different, please drop back by and let us know.
Yes, you can rename the individual product category pages, but is this what you’re speaking of?
Here’s the thing with Google PR and changing pages. You can change any title and it won’t effect your PR, but if you change a URL then it’s a new page as far as Google is concerned and you’re starting over. Worse than this though, is the fact that if your pages are already showing in Google search with a particular URL and you change that URL your customers will go to 404 error pages and enough of this can negatively impact your entire site’s rank. You can mitigate this with 301 redirects, but that is a distant second best solution.
Appreciated,
Don