Here is the way to go…….
Mage::getModel(
'core/cookie'
)->set(
'cookie_name'
,
'cookie_value'
, 0); # session cookie
Mage::getModel(
'core/cookie'
)->set(
'cookie_name'
,
'cookie_value'
, 60); #lasts 60 seconds
// To Get Cookies:
Mage::getModel(
'core/cookie'
)->get(
'made_productalerts_stock'
);
reference: http://jaseir.com/magento/setting-and-getting-cookies-to-set-cookies/
No comments:
Post a Comment