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 …

Quick Magento Tip: Logo / Images in Transactional Emails Not Appearing

Magento by default will choose the logo_email.gif from the default package and default theme. To force it to use the logo_email.gif or any other image from your custom package or theme add the following snippets to your skin url.

 
_package="MyPackageName" _theme="MyCustomThemeName"

Example:

 
{{skin url="images/logo_email.gif" _area=’frontend’ _package="MyPackageName" _theme="MyCustomThemeName"}}

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

 Page 1 of 3  1  2  3 »