• Resolved hunnsdon

    (@hunnsdon)


    There appears to be an error after a recent plugins updates:

    If you add to cart I get following error.

    Logged in Error
    Warning: Invalid argument supplied for foreach() in /home/xxxxxx/xxxxxx/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php on line 346

    Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxxxxx/xxxxxx/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php on line 357

    Not Logged in Error
    Error! The price field may have been tampered. Security check failed.

    If this site uses any caching, empty the cache then try again.

    I do not wish to share website address, unless via email privately.

    • This topic was modified 5 years, 1 month ago by hunnsdon.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, do you have a cache plugin installed in your site? If you do, have you excluded the cart page from getting cached?

    Regards

    Thread Starter hunnsdon

    (@hunnsdon)

    Hello

    I have tried disabling the cache plugin. Also what is the cart page address? I add to cart, but where is the page address to exclude?

    I have two pages that sell books. One works and one does not, which is odd. They both used to work fine. I have made not changes since the pages(s) creation. I tried excluding the book page with this issue bit still the same error.

    Regards

    Hunnsdon

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    I have tried disabling the cache plugin. Also what is the cart page address? I add to cart, but where is the page address to exclude?

    The following instructions for W3 Total Cache plugin might help you.

    https://www.tipsandtricks-hq.com/ecommerce/w3-total-cache-and-simple-shopping-cart-integration-3551

    I have two pages that sell books. One works and one does not, which is odd. They both used to work fine. I have made not changes since the pages(s) creation. I tried excluding the book page with this issue bit still the same error.

    Check to make sure there are no errors in the shortcode. This is usually the first place to check.

    Let me know how you go.

    Thank you

    Thread Starter hunnsdon

    (@hunnsdon)

    Hello

    There are no errors in any of the shortcodes, I looked. The pages haven’t changed since March 2020.

    I disabled the cache plugin so that’s not an issue. One page works, one one doesn’t I have changed nothing, this is odd!

    Any other issues, suggestions?

    Thx

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Okay lets try something different. Copy and past the shortcodes you are using from the page not working into a test page. Then carry out a test.

    Let me know what happens.

    Thank you

    Thread Starter hunnsdon

    (@hunnsdon)

    Exactly the same issue.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Can you share the shortcodes you are using. I will test them in my dev site.

    Thank you

    Thread Starter hunnsdon

    (@hunnsdon)

    [wp_cart_button name=”XXXXX” price=”51.99″]

    Okay I have removed the text.

    If you want the actual page I can send that to you but not in here. I will send privately. Perhaps to your website.

    Thread Starter hunnsdon

    (@hunnsdon)

    I think I have found the issue.

    Now remember I said it’s been working fine since March 2020.

    There must have been updates to your plugin since then.

    It appears that now your plugin doesn’t like characters ()-&# or comma (,) I used all of these in the description/book name.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Thank you for sharing more information. Can you give me an example of a name you are currently using that is causing this issue?

    Thank you

    Thread Starter hunnsdon

    (@hunnsdon)

    Okay:

    So it is the name=”” part of your shortcode that is at fault, I used to be able to include all characters such as #)-&,( etc. I had to remove those characters from the name field for it to work.

    Example:
    [wp_cart_button name=”Large book format, (2nd Edition) – #EU” price=”51.99″]

    Changed to:
    [wp_cart_button name=”Large book format 2nd Edition EU” price=”51.99″]

    It would be very good if I could use the characters as I did previously. Your plugin used to work with the other characters.

    EDIT:- ADDITIONAL INFO
    I don’t understand, I just looked at the other book page that didn’t have an issue and it also has these characters. This is most odd that one page had a problem and the other didn’t.

    I tried adding back the extra characters and it now works, very odd. All I changed was the text in the name=”” field back to what I used before .

    • This reply was modified 5 years, 1 month ago by hunnsdon.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, thank you for reporting back. I have submitted a message to the developers to investigate further your request.

    Kind regards

    Plugin Author mra13

    (@mra13)

    There is more validation that has been added to the plugin which can cause issues with some special characters in the product name. You can try enabling the following option in the settings menu of the plugin (if you need to use those special characters):

    
    Disable Price Check for Add to Cart 
    
Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Add to cart not working: errror’ is closed to new replies.