2

We have custom button "Save design" in product view page , once guest user clicked on that, it will display pop up as below, but after sometime, onclick button will not display pop up box, but once we delete cookies from browser, than pop up will display again.

In Private window also pop up will display initially, after some time same issue.

    <button onclick="return setproductlogin(\'<?php echo  
    Mage::registry("current_product")->getId()?>\', event);setrequestlogin();"  
     id="submit-editorApply-{{rand}}" >SAVE DESIGN</button>

script

function setproductlogin(pid, event)
{
event.preventDefault();
document.getElementById("likeproduct_id").value=pid;
jQuery("#productlistlogin").trigger("click");
return false;
}   

enter image description here

Browser cookies

enter image description here

Edit

when I delete var/session folder also issue is still there, pop up will work only after removing cookies from Browser

  • Do you get a JavaScript error when clicking the button? Or do you see any broken requests (when using Ajax to load the block)? – Arjen Miedema Apr 3 '17 at 6:03
  • @ArjenMiedema There is no js console errors in link – Baby in Magento Apr 3 '17 at 6:03
  • I do see one error Uncaught TypeError: Cannot read property 'change' of null. But in my case, the form always shows up. – Arjen Miedema Apr 3 '17 at 6:12
  • @ArjenMiedema yes, seems that error is not related to that, as pop up is working after we clear cookies, also it works fine in fresh browsers, after sometimes, same issue will happen in your system also.... – Baby in Magento Apr 3 '17 at 6:14
  • I clicked multiple time it show popup – Magento 2 Apr 3 '17 at 9:48
0

try to set a fixed cookie domain for this store, remove cookies and test this Issue again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.