In my controller function I'm setting cookie like
$cookie = Mage::getSingleton('core/cookie');
$cookie->set('frontAttributeLabel',$frontAttributeLabel ,time()+86400,'/');
In observer I'm retriving it's value and using it
$cookie = Mage::getSingleton('core/cookie');
$frontAttributeLabel = $cookie->get('frontAttributeLabel');
In the observer function it's working fine. After it's usage I'm deleting it using
$cookie->delete('frontAttributeLabel');
Once I'm done with the use of this observer (catalog_product_load_after
) function, next time I'm visiting the page again I see it's previous value is set.
I'm using wrong function to delete cookie? or I need to pass more parameters in delete function?
/
) as second argument in delete. And try using aset
with a time in the past to delete if that doesn't work. If both don't work it's not a deleting issue but something else – Sander Mangel♦ Sep 28 '15 at 8:47