loginonlycatalog icon indicating copy to clipboard operation
loginonlycatalog copied to clipboard

Found 3 Issues

Open gfemorris opened this issue 9 years ago • 1 comments

Hi,

i found two issues in this app:

  1. It's not possible to recover password. You should add this to the standard allowed routes.:
$this->_requestedRouteMatches(array('customer', 'account', 'forgotpassword')) ||
$this->_requestedRouteMatches(array('customer', 'account', 'forgotpasswordPost'));
  1. Sometimes the notice you can configure in backend is added twice. For example after registration. I did an additional check in _addSpashMessageToSession to avoid this:

    $messages = Mage::getSingleton('customer/session')->getMessages()->getItems('notice');
    $add = true;
    foreach($messages as $sMessage) {
    if($sMessage->getCode() == $message) {
        $add = false;
    }
    }
    if($add) {
    Mage::getSingleton('customer/session')->addNotice($message);
    }
    

    Maybe this is not the smartest solution, but it works well and is totally safe.

  2. There is no notice coming out when you get redirected from cms page. It's actually added, but gets cleared somehow before the redirect occurs. This seems to be a problem of the magento redirect mechanism, because redirect is not fired when you call it. And if Mage::getSingleton('customer/session')->getMessages(true) is called somewhere later they get cleared. I didn't have the time to debug this. Maybe i will do later.

So thanks anyway for this great extension... works very well.

gfemorris avatar Sep 04 '15 15:09 gfemorris

Thanks for the report! I've updated the observer accordingly (see commit 70cb9c2). Currently I also do not have time to check further why the issue with the CMS pages exists. All I can say is that it probably also depends on the Magento version, as it used to work. If you have more time to debug and locate the cause I'll be happy to try and come up with a solution.

Vinai avatar Sep 08 '15 11:09 Vinai