• Resolved mbgrafik

    (@marcobecker)


    Cart
    Switching languages when there are items in the cart

    Synchronize cart content when switching languages
    Prompt for a confirmation and reset the cart (x is activated)

    Switching currencies when there are items in the cart

    Synchronize cart content when switching currencies (x is activated)
    Prompt for a confirmation and reset the cart

    My settings are: redirect to cart after the product is added (i have only 1 product at the same time on sell)

    When i put a product in cart, then go back to shop and switch the language WCML’s message appears and i switch the language i will be redirected to any

    product site (not even to the one which was in cart). i would expect to be redirected to the page i’ve actually been on or to the empty cart page!

    When i’m on the cart page and switch the language it empties the cart and stays on cart page (what in this case is the correct behaviour)

    Now i checked it with twentysixteen:

    When i’m on my main language and put a product in cart and then switch to my second language it just empties the cart, without any notice.
    when i’m on the second language and then switch to the main language: WCML’s message appear

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mbgrafik

    (@marcobecker)

    ok, i had to run the troubleshouting steps from WPML > Support > troubleshouting.

    Now it works again (not sure which step resolved the behaviour).

    The only behaviour which i think is not as axpected is:

    When i have a product in cart and go back to the shop page then switch the language it redirects me to the product page, not the on one i was on when i swicthed (shop)

    Hello, thank you for reporting this.
    I will escalate it to our developers.
    For now, you can give a try to a workaround:
    in /wp-content/plugins/woocommerce-multilingual/inc/wcml-cart-switch-lang-functions.php
    change the code:
    $force_cart_url = add_query_arg( 'force_switch', 1, get_permalink() );
    to this code:
    $force_cart_url = add_query_arg( 'force_switch', 1, ('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));

    Be sure to adjust http to https if you are using https on your site.

    Be sure to make backup first as this is just quick and dirty fix and a more permanent solution remains to be found by our developers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘strange behaviour with some settings’ is closed to new replies.