Support » Plugin: WooCommerce » How to debug this error: There are some issues with the items in your cart.

  • ozanyilmaz2017

    (@ozanyilmaz2017)


    Recently 1 customer in my website told me that he receives this error

    There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.

    when he tried to checkout with a credit card in checkout page. From the tools panel of woocommerce, I clicked following buttons, and then removed all the cache and asked user to re-try:
    “clear transients”
    “clear expired transients”
    “recount terms”
    “clear all session”

    The user told me that the problem persists, so I tried to purchase the same items bank transfer instead of credit card, and it was success. I couldn’t replicate the issue.

    Based on your experience, maybe you may guide me what can be the reason. I am not able to replicate the issue since, it occurs after a purchase attempt with credit card.

    The error itself doesn’t give any clue to developer on why the error occurs, and how I can fix it. I also checked php_errorlog file on the same level with wp-content folder, but it doesn’t include any new messages. Please tell me where I can see the logs for this error if there exists, or how to debug this problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • ozanyilmaz2017

    (@ozanyilmaz2017)

    UPDATE: I called my 3rd party payment provider and asked them. They told me that the user who tried to purchase the products used 3D secure system. (This is an SMS service provided, where the bank sends an approval SMS to be able to complete the payment). The technical person at this 3rd party payment providers told me that, the user’s debit card doesn’t support 3D secure, and hence the bank returned an error code regarding this, which I believe that caused the checkout to fail. If that is the case, nothing seems wrong here excep the error message:

    There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.

    is misleading and causing harm to the website. The users may think that the website is broken, and as a developer, I am here tring to figure out what the problem is.

    The above scenario still not confirmed. I will be happy if an expert here helps with this.

    colourcascadefabrics

    (@colourcascadefabrics)

    My problem can’t be that as my customer went through their Paypal account, they were able to sign into Paypal and then was re-directed back to the website and got that error message. After we had a little play around, we discovered it was the Gift Card plug in on our site that was causing the issue, there was an update that we applied and it seemed to fix the issue

    ozanyilmaz2017

    (@ozanyilmaz2017)

    Below code part inside (class-wc-shortcode-checkout.php) triggers the page (cart-errors.php) which displays “There are some issues with the items in your cart.” message.

    That code part doesn’t care about the error type as you can see below, if it finds a notice with the name ‘error’ it displays the message “There are some issues with the items in your cart.”

    So I believe that any error notice during checkout will trigger the same message regardless of the error type. So you have seen it because of Gift Card plugin, and I believe I seen it because of 3D message. This is still a theory of me, and I am waiting for someone to confirm this or not. Help needed!

    
    		$checkout = WC()->checkout();
    
    		if ( empty( $_POST ) && wc_notice_count( 'error' ) > 0 ) { // WPCS: input var ok, CSRF ok.
    
    			wc_get_template( 'checkout/cart-errors.php', array( 'checkout' => $checkout ) );
    
    		}
    
    ozanyilmaz2017

    (@ozanyilmaz2017)

    UPDATE: Putting aside my customers’s debit card problem (still not resolved since I can not debug), the checkout page should be showing an error notices when “cart-errors.php” is called, but this template is very generic and misleading. I think this is something needs to be fixed.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    I’ve read through what you’ve said so far – it’s difficult to test this when the problem can’t be reproduced.

    Can you please tell me the exact steps the customer went through before they saw the problem? Given that you’ve mentioned the 3D secure option, it sounds like it’s happening after payment.

    Also, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status.
    Select “Get system report” and then “Copy for support”.  Once you’ve done that, paste it here in your response.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    As a tip to get you started, this was also reported here:
    https://wordpress.org/support/topic/how-to-debug-this-error-there-are-some-issues-with-the-items-in-your-cart/

    It sounds like it’s due to caching, so please disable any caching that you have enabled on your site via a plugin or via your host, then keep an eye out to see if the problem still pops up.

    ozanyilmaz2017

    (@ozanyilmaz2017)

    Hi Hannah,

    The customer adds some products to cart, and proceeds the checkout screen. In the checekout page, he chooses kredit card as payment method and iyzico payment plugin shows a panel to user to enter card details. Since it’s mandatory to use 3D secure for debit cards, the user is redirected to another page to enter an SMS message which he/she will receive to mobile for payment confirmation. After the sms password entered, the user is redirected back and faces with the error.

    The link you shared is a link to my post on this page.

    As I mentioned on this error page there are no notices which indicates the user, what the error is really about. So I added a hook to show notices on this page, and also on this hook, I send myself a mail.

    I didn’t ask user to re-test because the notice that will be shown to user may not resolve the issue, and since that person is a customer, I don’t want to disturb him by asking test tasks, and re-tries. He already tried a lot to pay.

    So if he will come back to page, at least this time, system will send a mail to me regarding the error message which occurs inside the checkout() method.

    On the other hand, I believe that the hook that I added to my functions php to show a notice or error must not be externally added, but must be a core part of the wordpress build, because generic errors are not helping us. The problem here is that whatever error occurs on the checkout() function, the user is redirecated to cart-errors.php which displays a generic error.

    Here is an example why this is bad coding. To replicate the issue user faced, I tried my own debit card. I tried to purchase some products, and woocommerce showed the same error message to me: “There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.”

    But in fact, the real error here was, I didn’t have enough cash on my card. So there were no issues with the items in my cart.

    As a summary I gave up tring to figure out what’s causing the error, but I took precautions myself to prevent this kind of issue ever occur to me.

    Thanks.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for explaining further!

    It sounds like the error reporting could definitely be more robust. Given what you’ve already changed, could you either make this as a suggestion on the WooCommerce Githu repo, or do a pull request?
    https://github.com/woocommerce/woocommerce

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to debug this error: There are some issues with the items in your cart.’ is closed to new replies.