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
Ok, for reasons of general simplicity and familiarity I like to develop my php applications in a Windows environment using WAMP. However, this can be problematic when needing to apply SUPEE patches to development instances of Magento projects.
Continue reading Applying Magento SUPEE Patches on a Windows environment
So you have got your site all nicely working with your ssl certificate ready for your site to run fully in https:// to appease Google but your padlock never stays green. For my setup I traced this down to the various form submission URLs such as “add to cart”. Here is how I finally solved it.
Continue reading Magento – Making add to cart urls use https when site is secure
When your Magento installation has multiple sites set up within it, you will probably want to change which site shows based on domain or subdomain URL. You can do this via .htaccess or your httpd virtual hosts config. Continue reading Set Magento website based on URL
I was just debugging a Magento problem and thought I would list out all the available methods for the category objects I was working through. Quite handy to have as a reference I thought, so here they are.
Continue reading Magento Category Object Methods
This was a curious and frustrating problem to fix. After updating the local dev copy of a a magento site, and changing a few local folder permissions the admin area stopped working, giving instead an error message of: ERROR_CONNECTION_RESET.
Continue reading Magento admin on localhost gives ERROR_CONNECTION_RESET message (winamp)
A new security patch has been released for Magento in the last few days. I have had to patch a number of sites running different Magneto versions and ran into a couple of common issues. This might help others having trouble.
Continue reading Problems running SUPEE-6788 Patch
If, after apparently a successful installation of the SUPEE-5994 patch, you get an error message along the lines of
Class ‘Mage_Install_Controller_Router_Install’ not found
Then here is a suggestion that may help.
Continue reading Error or whitescreen after successful patch SUPEE-5994