Skip to main content
8 events
when toggle format what by license comment
Mar 31, 2018 at 14:52 comment added taskle Yeah, I realized I just messed up the operator location. Or !($currentUrl == $url) could have worked.
Mar 31, 2018 at 14:51 vote accept taskle
Mar 31, 2018 at 14:47 answer added AJK timeline score: 1
Mar 31, 2018 at 14:37 comment added AJK No problem, the first example would work like this if($currentUrl != $url) { //redirect} but glad you got it to work!
Mar 31, 2018 at 14:33 comment added taskle Thanks for the comment, after thinking about it, this made complete sense. I tried doing if(!$currentUrl == $url) { //redirect} but it failed. However, if($currentUrl == $url) {} else { // redirect } worked perfectly. Thanks so much!
Mar 31, 2018 at 14:19 comment added AJK To stop the infinite loop you might be able to add another condition to your if statement not to fire the redirect if current url == target url. You can get current url using $currentUrl = Mage::helper('core/url')->getCurrentUrl();
Mar 31, 2018 at 14:09 history edited taskle CC BY-SA 3.0
deleted 189 characters in body
Mar 31, 2018 at 13:59 history asked taskle CC BY-SA 3.0