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
8) 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.

Categories: SEO Strategies, WordPress Tags: WordPress, wp-ecommerce

27 Responses to “WordPress Shopping Cart WP-Ecommerce HelpComment RSS feed

  • Adhamox
    November 19th, 2008 12:09 pm
    #1

    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

  • david
    November 21st, 2008 5:06 pm
    #2
    Author's Reply

    Hey Adham,
    Thanks for that. It worked like a charm.

  • maris
    April 15th, 2009 8:23 am
    #3

    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?

  • david
    April 15th, 2009 9:19 am
    #4
    Author's Reply

    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” ?

  • mark
    May 20th, 2009 8:06 am
    #5

    I continue to get the “Sorry — You last action could not be completed.” Not sure what the deal is.

  • david
    May 20th, 2009 11:25 am
    #6
    Author's Reply

    @ mark, what’s the website url?

  • reiko
    May 25th, 2009 10:36 am
    #7

    anyone knows why doesn’t the paypal gateway option work when i activate google checkout gateway?

    help!

  • elisa
    July 8th, 2009 2:03 pm
    #8

    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?

  • David
    July 10th, 2009 5:38 am
    #9

    Elisa,
    Which code are you trying to add?

  • Doug Lentz
    August 29th, 2009 7:32 pm
    #10

    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!

  • david
    September 10th, 2009 8:58 am
    #11
    Author's Reply

    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.

  • Sumon
    September 18th, 2009 8:41 am
    #12

    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,

  • thomas
    October 19th, 2009 12:48 pm
    #13

    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

  • Chris
    October 21st, 2009 11:10 am
    #14

    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

  • david
    October 21st, 2009 11:42 am
    #15
    Author's Reply

    @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.

  • mike p
    December 13th, 2009 4:08 pm
    #16

    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?

  • Don Stevens
    December 28th, 2009 9:14 am
    #17

    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

  • david
    December 28th, 2009 11:00 am
    #18
    Author's Reply

    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.

  • Don Stevens
    December 28th, 2009 12:52 pm
    #19

    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,

  • david
    December 29th, 2009 10:54 am
    #20
    Author's Reply

    Hi Don,
    I am sure there are plenty of people using this with a thesis theme, why do you ask?

  • TR
    December 30th, 2009 9:31 am
    #21

    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

  • David
    January 3rd, 2010 12:36 pm
    #22

    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

  • Don Stevens
    January 3rd, 2010 12:53 pm
    #23

    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
    January 4th, 2010 9:21 am
    #24
    Author's Reply

    @ David
    You may want to have a look at the file wp-content/plugins/wp-e-commerce/merchants/paypal_pro.php

  • david
    January 4th, 2010 9:35 am
    #25
    Author's Reply

    @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

  • Carla
    December 9th, 2010 6:40 pm
    #26

    I am using:
    Wordpress 3.0.2
    WP e-Commerce 3.7.7
    Have an SSL certificate
    PayPal Pro for a gateway
    Wordpress HTTS plugin

    I tried my first checkout test 4 times to no avail. There are 2 zipcode fields. It was obvious which one does did not belong there, as the field was grayed out. Once I removed the “same as billing option” it became black, but I still have 2 fields I cannot complete the checkout. The form just refreshes upon completing the shipping information. I have tried using the check button for “shipping address same as billing” and without it. I have tried filling in both zipcode fields and still cannot complete the checkout. I have SSL on all product pages and checkout page. I have my cart on the page. Does anyone know which file I can edit and what code to remove to get rid of the extra zipcode field? Or perhaps something else is wrong in addition to the zipcode fields.

  • Mark
    April 8th, 2011 7:42 am
    #27

    Hey, I have set paypal standard as my payment gateway. When I test and get to check out, the page just sticks. It doesn’t go off to payment. It seems a common issue but I can’t seem to find a solution.

    Can anyone help please?

    Cheers
    Mark