Ecommerce Shopify WordPress Discussion

troubleshooting Cross-Domain Checkout Integration in WordPress Websites

I have two WordPress websites: let's call them website.com, which is the main website, and website.store. On my main website, when the "Buy Now" button is clicked, it opens an iframe that loads website.store/checkout_1, but the client still sees webstite.com in the URL bar, even though they are technically on website.store. However, I've encountered issues with the checkout page. When I click the place an order button, an error message saying, "Sorry, your session has expired. Return to shop." Additionally, there's a problem with the product price display: it initially shows the price, but after a few seconds, it changes to 0€, and the payment method it disappeared too. But when visiting directly the website.store/checkout_1 from the browser all working fine. To address this, I attempted to modify the htaccess file in the website.store with the following directives: Header set X-Frame-Options "ALLOW-FROM https://website.com" <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "https://website.com" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS" Header set Access-Control-Allow-Headers "Content-Type" </IfModule> My javascript code added in website.com to add the iframe jQuery(document).ready(function($) { $('.buy-button').click(function(event) { event.preventDefault(); var productId = $(this).data('product-id'); var checkoutUrl = "https://website.store/checkouts_1"; // Replace the entire HTML content with the iframe $('html').html('<iframe src="' + checkoutUrl + '" frameborder="0" style="border: none; width: 100%; height: 100vh;"></iframe>'); }); }); any ideas about the issue ?
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.