• Resolved Mike

    (@mikkey0001)


    I have a site that uses variable products. When using a later version of Safari, I have 17.1.2 but other versions have failed while older versions work, adding a product to the cart gives some strange behaviours. Disabling Apple Pay everything reverts to working.

    This was originally on a site using Shoptimizer theme but also tested with Storefront.

    When adding a product to the cart qty of 2 is added.

    Selecting and adding a different variation of the same product changes all cart contents to the new variation.

    Adding a different product to the cart clears out existing products but add the new product to the qty ordered.

    Adding a simple product to the cart works, but it can be deleted if a variable product is added after.

    On a staging site I have updated all software to current versions and turned off all caching.

    I can give you the address of the staging site, but prefer not to make this public.

    thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mikkey0001

    I can give you the address of the staging site, but prefer not to make this public.

    You can create a support ticket here where you can share the url of your site. Disclaimer: the user is not being asked to share any information beyond the url of their site. They have expressed their wish to keep the url private.

    Adding a different product to the cart clears out existing products but add the new product to the qty ordered.

    The plugin doesn’t hook into any of the WooCommerce add to cart functionality. Are you clicking the Apple Pay button, or are you referring to the clicking of the “Add to Cart” button on your product page?

    Kind Regards

    Hey, we also odd behaviours when apple pay was enabled, products would disappear from the cart randomly. Had to disable apple pay and the cart is back to working properly. We are also using the Shoptimizer theme.

    Plugin Author Payment Plugins

    (@mrclayton)

    @blclda

    In all similar cases to this, we have found that the issue is a related to a miss-handling by a 3rd party plugin. The Apple Pay button must launch the Apple Wallet synchronously, or else the browser will trigger an error.

    To accomodate that requirement, the Stripe plugin performs a calculation when the product page loads. The result of that calculation can then be fed to the Stripe JS SDK. The cart calculation uses the WooCommerce cart. The WooCommerce cart triggers certain actions, which if not handled correctly, can result in an emptying of the cart. That is likely what’s happening on your site.

    Kind Regards

    That’s probably what it was, I had to disable it because of this and will keep it disabled. Couldn’t figure it out any further other than the apple pay being the cause.

    Plugin Author Payment Plugins

    (@mrclayton)

    @blclda

    You can create a support ticket here if you would like us to review the Shoptimizer theme.

    adkanojia

    (@akashdeepkanojia)

    Hi @mrclayton

    I faced the same issue on my website. Though I’m using a custom theme.

    For anyone else reading this.. I fixed the issue by removing Apple Pay payment button from product page and things started working as expected.

    Any updates on fixing this issue?

    Kind regards,

    • This reply was modified 10 months, 3 weeks ago by adkanojia.
    Plugin Author Payment Plugins

    (@mrclayton)

    Any updates on fixing this issue?

    This isn’t an issue that’s caused by the Stripe plugin. It’s the result of 3rd party code that incorrectly handles the cart object when cart actions are triggered. The Stripe plugin uses the cart to calculate the Apple Wallet object when the product page loads. This has to be done, because calculations can’t be done asynchronously or the button click will fail.

    During that cart calculation, the 3rd party code is likely emptying the cart. We can’t control how 3rd party code handles requests, so unfortunately this is something that has to be resolved via the plugin that’s causing that behavior.

    Kind Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Apple Pay causes cart to behave oddly’ is closed to new replies.