Marketpress number_format()

I into the main sites admin and notice some sitting orders there with a php error, these are orders made in client sites:

Warning: number_format() expects parameter 1 to be double, string given in /public_html/wp-includes/functions.php on line 155

See screen for example.

The orders in this screenshot were all made at client websites, They all had values of between £25 and £35. All use Paypal Express.

- Why do they show in the main sites "manage orders" area? (main site = master site in a multisite install)
- Why do they all show the wrong value, ie £0?
- None show the actual shop the purchases were made in.

Orders have been made at other client websites with success that don't show in the main sites "manage orders" area.

The ones producing this error all have one common denominator, I created their sites first with my e-mail address. Addresses have obviously been changed since the client took over management.

  • Timothy Bowers

    Latest versions of both are running.

    There are other sites on the network, I created them myself as we don't permit automated spamup, I mean sign up. The difference is those used the clients e-mail address from the start. The ones this is happening on used my e-mail at first, ie the super admin e-mail.

    I mention this because I noticed on the BuddyPress wall for blogs/sites if I have an account on those sites it will show my avatar as the blog avatar if my e-mail was used when creating the site (and changed later) and continues to do so unless I remove myself totally as a user from that blog. It then defaults to the another admins avatar. Thats the only difference I can think of.

    You are of course welcome to get in touch over mail and I'll demo the install to you.

    Not sure of the cause just yet and not sure if there is a relation but it seems odd to only happen on sites where my (super admin) email was used in creation and then changed.

  • Timothy Bowers

    Nope, global cart is off, mainly because it turns off the options of other gateways (paypal express and such).

    I actually have had a few errors today looking at the logs but I don't think they relate, here they are:

    [08-Jun-2011 02:43:43] WordPress database error Unknown column 'feed' in 'where clause' for query SELECT * FROM swn_bp_activity WHERE id IN (feed) ORDER BY date_recorded DESC LIMIT 0, 20 made by require, require_once, do_action, call_user_func_array, bp_core_do_catch_uri, load_template, require_once, locate_template, load_template, require_once, locate_template, load_template, require_once, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_specific, BP_Activity_Activity->get_specific
    [08-Jun-2011 02:43:43] WordPress database error Unknown column 'feed' in 'where clause' for query SELECT count(id) FROM swn_bp_activity WHERE id IN (feed) made by require, require_once, do_action, call_user_func_array, bp_core_do_catch_uri, load_template, require_once, locate_template, load_template, require_once, locate_template, load_template, require_once, bp_has_activities, BP_Activity_Template->bp_activity_template, bp_activity_get_specific, BP_Activity_Activity->get_specific

    [08-Jun-2011 18:19:49] PHP Fatal error: Call to a member function get() on a non-object in /home/sworld/public_html/wp-includes/cache.php on line 93

    Not had them before, but have just done an upgrade recently, there are also some memory exhaustion's which we haven't had before but I'll sort those.

  • Timothy Bowers

    I also receive order e-mails:

    A new order (1e179e2b7712) was created in your store:

    Order Information:

    Order Total: 1.00 1

    Shipping Information:

    Full Name: *** ***** ****
    Address: *** ***** ****
    Address 2: *** ***** ****
    City: *** ***** ****
    State/Province/Region: *** ***** ****
    Postal/Zip Code: *** ***** ****
    Country: GB

    Payment Information:

    Payment Method: PayPal
    Payment Type: PayPal balance, Credit Card, or Instant Transfer
    Transaction ID: 1
    Payment Total: 1.00 1

    Your payment for this order is not yet complete. Here is the latest status:
    January 1, 1970 - 12:00 am: 1: Completed: The payment has been completed, and the funds have been added successfully to your account balance.

    You can manage this order here:

    This was an e-mail I received after the order for the one in the screen shots above, note the order total and date is wrong.

  • Timothy Bowers

    Here is an e-mail I received for an order on another clients website, this one was not inserted in the main site. The original e-mail used when creating the site was the clients.

    The order total though is wrong, it stats £5 when it was actually £3. The clients e-mail though is correct apparently (I asked and they confirmed).

    A new order (5448c6368c42) was created in your store:

    Order Information:

    Order Total: 5.00 5

    Shipping Information:
    Full Name: *** *** ***
    Address: *** *** ***
    City: *** *** ***
    State/Province/Region: *** *** ***
    Postal/Zip Code: *** *** ***
    Country: GB

    Email: *** *** ***

    Payment Information:
    Payment Method: PayPal
    Payment Type: PayPal balance, Credit Card, or Instant Transfer
    Transaction ID: 5
    Payment Total: 5.00 5

    Your payment for this order is not yet complete. Here is the latest status:
    January 1, 1970 - 12:00 am: 5: Completed: The payment has been completed, and the funds have been added successfully to your account balance.

    You can manage this order here:

    The url on this order for "manage this order" was for another website though, it was for one of our sites rather than the clients.

  • Timothy Bowers

    I had someone process an order for £0.01 when sent back from paypal they got this error:

    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/marketpress/marketpress.php on line 2064

    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/marketpress/marketpress.php on line 2064

    Thank you for your order! We appreciate your business, and please come back often to check out our new products.

    Your PayPal payment for this order totaling £0.01 is complete. The PayPal transaction number is

    The order is added to the main site also.

    When I processed the order with manual payment it worked fine. Still checking other things.

  • Timothy Bowers

    The problem was with Contact 7 plugin. That plugin was not the most recent though and so I upgraded it and now the problem seems to be resolved in test mode.

    Strange though that it only affected those which I created with my e-mail and then changed.

    It was painstaking but resolved now. I'll await some real transactions though.

    Thanks for your time guys, I should have really done that testing first. dohh. lol

  • Timothy Bowers

    Some real transactions have gone through since my last post. I got a contact today from an admin of one site telling me he got some order emails through but he is not using the shop. I asked him to forward them me so I could look. The order ID belongs to another website and client which he is not associated with with the exception of making a purchase there once.

    He got two emails regarding two different orders with the customers details included.

    Obviously this raises Data Protection issues.

    The website which took the orders has more than these two orders so I wonder where they went and the cause.

    Again things like the date and time are wrong within the email body:

    January 1, 1970 - 12:00 am: 9: Completed:

    As well as order total:

    Order Total: 9.00 9

    The total was actually £3.

    I realise the issue for at least part of this thread was Contact7. Just not sure why he only received a couple and not all? Makes it harder to debug with less predictability.

    Is the super admin suppose to receive order e-mails as well?

  • Timothy Bowers

    The client who received the emails doesn't have marketpress installed. (not network activated). His email is not in the other clients store and his store is not the main blog.

    Total orders for this client is 7 since the 6th June. 3 of which have fake copies in the main store. Two I know were mailed to the owner of another website.

    I guess the culprit is probably contact7 again.....

  • Aaron

    We havn't seemed to be able to recreate this issue, but I think I know where it is happening.

    First to verify, it's only with the PayPal Express gateway, right?

    If so, can you do some debugging with me? Try adding this to line 345 of the paypal express gateway file, right under the check response part:
    var_dump($result);

    Then run some test checkouts and paste the results here, especially noting any that created error orders on other blogs.