I'm using Magento 1.4.1.1.
The following contains a useful URL when run in "template/catalog/product/view.phtml".
$this->helper('core/url')->getCurrentUrl();
When I try to get the same URL by running the following from "Mage_Customer_AccountController". I don't get the same URL.
Mage::helper('core/url')->getCurrentUrl();
Is there anyway I could save the URL value from "template/catalog/product/view.phtml" and be able to use that variable in "Mage_Customer_AccountController" methods ?
Don't hesitate to provide code snippets as I'm new in Magento.
Thanks
view.phtml
file are you referring to? What's the difference between the URLs?getCurrentUrl
method returns the URL you are on, the one you see in your browser. Since thetemplate/catalog/product/view.phtml
file means your on a product (could be any url) andMage_Customer_AccountController
means your on the urlcustomer/....
these 2 won't return the same URL as they aren't the same page