I have one phtml.
In there i m check one variable if that variable is null than it should be redirect to Controller action
I m trying this code:
Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl().'marketplace/vendor/selectcategory');
but using this code if variable is not null than also redirect but i don't want this. I need to redirect when variable is null
Best Answer
Please try this...
better way to use JavaScript: