Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento and Best Way to Sync Sessions across stores
    primarykey
    data
    text
    <p>I am syncing sessions between two different domains for Magento using a token passing technique with a remote iframe or img. I am about to implement it into Magento and was looking for some pointers.</p> <p>I will have to do two things:</p> <ol> <li>Every 5 mins, output an iframe or img with a remote SRC attribute for the second domain. <ul> <li>Q. Where is the best place to implement this? In the past I did storewide actions by overriding the renderLayout() method in Magento. Should I just do it by appended a block to the end of the page load? If I use a block, is it still keeping MVC?</li> </ul></li> <li>I need to sync the session on the other domain when the script is called. I need to set the same cookie that Magento would set, that links to that session for the user. <ul> <li>Thinking about this, I think I am going to have to load Mage::app or whatever the call is that loads the Magento environment.</li> <li>Q. Is there a lighter way of doing this?</li> </ul></li> </ol> <p>Just for better understanding of what I am doing, here is a quick description of the flow.</p> <ol> <li>User goes to Site A. If its time to sync the sessions, an IMG or IFRAME is outputted with SRC pointing to site-b.com/sessionSyncer?token=SHA1TOKEN</li> <li>sessinSyncer validates the token and if so, creates a session and sends the cookie to the browser for the session. This should happen in a Magento manner </li> </ol> <p>I am aware that Magento has the ability to pass session through the URL and generates the links to do so, but this is inadequate because the user must only switch sites using those special urls, plus the URL becomes ugly.</p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload