Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为我的 magento 商店使用 jscript 登录。问题是即使在登录后也会出现登录窗口......我在我的主页模板正文标签中使用了 onload="showSmartLoginDialog(); 。请指导我实现这一点。
在模板中的正文标记周围使用条件代码。试试这个而不是<body>:
<body>
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) { echo '<body>'; } else { echo '<body onLoad="showSmartLoginDialog()">'; } ?>