have something like this: click in page A and redirect to page B, click in page page B redirect to page C, is there any way to get the URL of page A when I am in C page? and check if page A = 'domain.com/aboutus'.
I am not so good in javascript, I try to do this in PHP but is not work very well because the LastURL here is not the page that I want, maybe someone can show me an script example.
if (strpos(Mage::getSingleton('core/session')->getLastUrl(), 'checkout/cart') !== false) {
Mage::getSingleton('core/session')->setIsFromCart('1');
} else {
Mage::getSingleton('core/session')->setIsFromCart('0');
}
if (strpos(Mage::getSingleton('core/session')->getLastUrl(), 'onestepcheckout/index') !== false) {
Mage::getSingleton('core/session')->setIsFromCheckout('1');
} else {
Mage::getSingleton('core/session')->setIsFromCheckout('0');
}
Thank you