1

I have to set a cookie in magento, say current_city in OPC. I have set the same via Magento in built cookie function.

Mage::getModel('core/cookie')->set('current_city',$city);

I wanted to modify the value and expiry of the cookie in front end when the city value is changed from a dropdown.

I tried to use following magento js function to update the cookie.

Mage.Cookies.set('current_city',city,365*24*3600*1000);

But the cookie is not getting updated or deleted.

What might be the issue?

Thanks.!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.