I am in the process of trying to set a Magento cookie variable on click using jQuery but can't seem to get it too work.
Would the best way to do this be to hit a controller action using ajax when the click event is fired and then use the following code snippet inside the controller action?
Mage::getModel(‘core/cookie’)->set($name, $value);
Or is this approach a complex way of doing such a task and is there a different approach I should take?