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.
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 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"}}
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’ …
<?php
$file_handle = fopen("path/to/file/Book2.csv", "r");
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 1024);
print "<p>" . $line_of_text[0] . "</p>";
print "<p>" . $line_of_text[1] . "</p>";
print "<p>" . $line_of_text[2] . "</p>";
}
fclose($file_handle);
?>
» Sample CSV File
<?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)’;
?>
