Magento Fix – Transactional Email Preview Showing HTML only

In Magento version 1.6.1.0, I noticed when previewing a transactional email it displayed in html only. Obviously this isnt right so I come up with this little fix.

Stop Magento Redirecting to Empty Cart on Success.phtml

Recently when trying to modify the success.phtml section in magento, I found it very frustrating the fact you had to make new fake orders to see your modified file. Of course I could have used firebug or some extension like that but I much prefer making modifications and hitting refresh.
After …

Magento Issue Fix – “El is NULL”

I have recently come across an issue when trying to add a Widget to a CMS page.
When clicking “Insert Widget” a javascript alert appeared shouting El is NULL.
The reason for this is a missing forward slash from Lib/Varien/Data/Form/Element/Editor.php Line 202.
To fix this error copy Lib/Varien/Data/Form/Element/Editor.php to app/code/local/Lib/Varien/Data/Form/Element/Editor.php
app/code/local/Lib/Varien/Data/Form/Element/Editor.php
Line 202 – Replace

‘onclick’ …

Magento – Get Cart Quantity Within A Session

<?php
function getCartQuantity () {
$cart = Mage::getModel(’checkout/cart’)->getQuote()->getData();
if (isset($cart[’items_qty’]))
return (int)$cart[’items_qty’];
else
return 0;
}
echo getCartQuantity ().’ Item(s)’;
?>

Magento – Show Firstname or Lastname Only In Welcome Message

If you would like to change the default welcome message in magento from “Welcome, Paul Donnelly” to “Hi Paul” or “Hello Mr Donnelly”, use the following snippets within
app\design\frontend\default\default\template\page\html\header.phtml

Magento – Display Address Fields on Create an Account

By default Magento doesnt show the address fields within “Create an Account”. To make the sign up process more user friendly you can enable the address fields by adding the following:
Open app/design/frontend/default/default/template/customer/form/register.phtml
Around line 78
Before

<?php if($this->getShowAddressFields()): ?>

Add

<?php $this->setShowAddressFields(true); ?>

 Page 1 of 4  1  2  3  4 »