How to create custom address renderer with the following template in one line
{{var street}}, {{var city}}, {{var region}} {{var postcode}}, {{var country}}
I can't change the native address templates, because they are used for order view pages, pdf, etc.
When i try
$renderer = Mage::helper('customer/address')->getRenderer(Mage_Customer_Model_Address_Config::DEFAULT_ADDRESS_RENDERER);
$renderer->render($address, $format);
i catch Fatal error: Call to a member function getCode() on a non-object in <b>app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 85