Agnir Posted March 21, 2019 Share Posted March 21, 2019 I am using the following url to add product to cart externally:- https://mystore.com/index.php?controller=cart&add&id_product=10&qty=1 The Problem is when the user clicks on the link and he has never opened the website. The product does not get added to the cart anyway to bypass this? Link to comment Share on other sites More sharing options...
Agnir Posted March 21, 2019 Author Share Posted March 21, 2019 (edited) Solved this issue by loading the website in a iframe with display set to none, Would recommend to deffer iframe loading to last with the following script such that it does not interfere with whatever you are doing var iframe = document.createElement('iframe'); iframe.style.display = "none"; iframe.src = your_iframe_source_url; document.body.appendChild(iframe); Edited March 21, 2019 by Agnir (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now