Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Kristi at Klarna

    (@klarna)

    Hi @mattheus ,

    When a product variant is changed, the plugin should refresh the Klarna On-site messaging with the new price, as documented here: https://docs.klarna.com/conversion-boosters/on-site-messaging/additional-resources/placements/#refresh-placements and https://docs.krokedil.com/klarna-for-woocommerce/get-started/klarna-on-site-messaging/

    Can you test (ideally in a non-production shop) with the Storefront theme (as documented in #6 at https://docs.krokedil.com/krokedil-general-support-info/guide-to-troubleshooting-in-woocommerce/) to determine if your theme is impacting this issue with non-standard behavior when a product variant changes?

    Plugin Contributor Kristi at Klarna

    (@klarna)

    Hi @mattheus ,

    please share feedback from testing with the Storefront theme when time permits.

    thank you!

    Thread Starter Mati

    (@mattheus)

    unfortunately I can’t test that because the website is live. but it worked before.

    I also get an error in the debug:
    [13-Jan-2025 10:57:22 UTC] PHP Warning: Attempt to read property “ID” on null in /public_html/wp-content/plugins/klarna-payments-for-woocommerce/dependencies/krokedil/klarna-onsite-messaging/src/Utility.php on line 103

    and in the console I also see an error:
    https://prnt.sc/ZhkpANZoDaev

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi @mattheus,

    When i visit this product https://luizaxl.nl/11-delige-keukenkastenset-bewerkt-hout-artisanaal-eiken/ the price is updated correctly in the Klarna on site messaging widget when changing the variation.

    I was able to recreate the issue regarding the price not being updated in the Klarna on site messaging widget i my local testing environment, the issue was solved when i created a new variable product. If you are still having issues, try and create a new variable product and see if it works then.

    Thread Starter Mati

    (@mattheus)

    I think I found the problem. I just noticed that your plugin got a new look with a plugin update. Yesterday I looked in between and I also noticed that my country and Credentials were not filled in, while they were still there with the old plugin version. I placed the id and it works again. I will still keep an eye on it.

    but in the debug list I still see the php warning and in the console the error with: Klarna Web SDK: The provided theme (mobile) is not a valid argument. Please use one of these valid values: default, dark, custom, light.

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi @mattheus,

    From version 3.7.0 of Klarna for WooCommerce there is a new plugin settings page. With this new settings page the Client ID was not migrated, as you already noticed you need to go to the plugin settings and add the Client ID for all countries again.?

    You also need to whitelist your site URL in your Klarna account settings. Go to your Klarna merchant portal –> Payment Settings –> Client identifier –> Allowed origin, register your URL there.
    Please see our documentation here.

    Regarding the PHP warning in the console. In your Klarna plugin settings for On-Site Messaging, have you set the Cart Page Theme and Product Page Theme to Dark, Light or Custom?

    Thread Starter Mati

    (@mattheus)

    thank!

    for the php warning i used the shortcode placement i use custom product page [onsite_messaging data-key=”credit-promotion-badge”] i fergot to add “data-theme=”custom”” in de shortcod. i have add this to the shortcode and this whas the fix. thanx!

    Thread Starter Mati

    (@mattheus)

    I am still encountering an error.

    I am using the plugin with the correct client ID and have manually added the script to the body. Additionally, I am using two shortcodes:

    • On the product page: [onsite_messaging data-key="credit-promotion-badge" data-theme="custom"]
    • At the bottom of the mobile menu: [onsite_messaging data-key="top-strip-promotion-auto-size"]

    However, I receive the following console error:
    “Another Klarna Web SDK was already included in the page. Please consider using the data-client-instance-name attribute on the klarna.js script tag to avoid conflicts.”

    If I remove the script from the body, the shortcode on the product page continues to work correctly, but the shortcode in the mobile menu no longer functions. Conversely, if I deactivate your plugin, the shortcode on the product page stops working, while the shortcode in the mobile menu works again.

    This behavior suggests something isn’t configured correctly. Could you please investigate this issue?

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi @mattheus ,

    The script should only be manually added to the body if you are not using our Klarna for WooCommerce plugin and still want to use On Site Messaging. Our plugin already use the script which most likely is the reason for the error “Another Klarna Web SDK was already included in the page…”. Since you are using our Klarna plugin you need to remove the manually added script from the body, but keep the two shortcodes. Then also add this filter to display On-site Messaging on all pages.

    Does these changes help?

    Plugin Contributor Kristi at Klarna

    (@klarna)

    Hi @mattheus ,

    Any feedback or further support needed prior to closing this thread?

    Plugin Author Klarna

    (@klarnaplugin)

    Closing this thread.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.