Home » Magento » Magento set, get and delete cookie data

Magento set, get and delete cookie data

How to magento access cookie data or create, read, and delete cookie in magento? Magento Mage_Core_Model_Cookie class can be use to get,delete and set cookie data.If you try to use normal php cookie to get data, sometimes not working.

Magento set cookie data/values

NOTE:name and value are required.Other parameters are optional and can be set as null.

Usage


Magento get all cookies data/values

Magento get specific cookie data/value


Magento delete cookie data/value

Usage


You can refer more information from app\code\core\Mage\Core\Model\Session\Abstract\varien.php of line 84.

Tags

Similar posts