Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    Hello,

    Unfortunately I’m not very familiar with TranslatePress (usually use Polylang here) but I’ve done some preliminary debugging as a customer on your site – sorry for the failed orders.

    The issue is that when you press the button, the purchase intended is stored in the users’ session using Ajax. Then the user is redirected to a “landing page” that either starts the purchase or ask the user to accept terms and conditions. On your site, this is /no/vipps-buy-now when coming from a norwegian page.

    On this page, the requested purchase is restored *and deleted* from the session so that a reload will not restart the purchase.

    On your installation however, something, and I guess it is Translatepress, *does* reload the page after this has happened, redirecting it to the english version (at /vipps-buy-now). But then the purchase has been deleted form the session, so you get a message “The link you have followed is for a product that is no longer available at this location. “.

    Since you do not have the “Require consent to terms and conditions” option on, this sometimes happen *after* the purchase has been set in motion, because this too happens asynchronously using ajax. This probably causes the error messages in your log; as the purchase will have been initiated, but with the user not having been redirected to the app.

    Ideally, the fix would be to stop this redirect/reload. If you have a “automatically detect user language” feature or similar turned on in TP, try turning that off first (at least for the Vipps pages, if possible.)

    Failing that, there will have to be rewrites to the plugin itself, and you will need to have the terms-and-condition feature on so that the actual purchase does not start until the user interacts with the page.

    You may also try to turn on “Compatibility mode” in the settings. This changes the “Vipps buy now” feature so that it actually adds the product to the normal cart and continues to express checkout as if it was a Cart purchase instead of a single-product purchase. This uses a different mechanism and may survive page redirects and reloads.

    Plugin Author Iver Odin Kvello

    (@iverok)

    Have you made any progress on this? I have added an issue on the bug tracker for this (https://github.com/vippsas/vipps-woocommerce/issues/60) – it may be harmless to remove the “Do not allow reloads of this page” restriction, and if so, it may be fix this issue for you.

    There should still not really be any reloads of this page, but it may be hard to stop this for any given third-party plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Vipps + TranslatePress’ is closed to new replies.