So, I was testing the “this site is using cookies” functionality in Magento. It worked fine on a local environment but failed to work on a test “live” IP address site. I say failed, but it worked fine in IE and Firefox whereas in Chrome hitting the “I agree to cookies” button didn’t set a cookie and redirected. I eventually solved it. Continue reading Magento Cookies not Working in Chrome or Opera on Frontend
Another Magento quickie for when you want to pass a value into your phtml template file that is set/generated inside the controller.
Inside the controller you can do this:
Where $block could be something like
$block = $this->getLayout()->getBlock(“head”) ;
if you wanted to pass the value into the head template.
You can also set a value like this:
Then, inside the phtml template file you can get the value like this
Note you can pass multiple variables through a single $block->assign() like this
This chestnut can drive developer crazy. In Google Chrome hitting “save as” or “view source” will reload the page. On pages where sessions or cookies are cleared (shop checkouts for example), form data is submitted, or the like, then the reloaded source may no-longer be the same as the page you were just looking at. Argh. Here is my solution to the issue. Continue reading Saving the page HTML in Chrome without reloading