Magento Themes and Magento Extensions

Magento ERROR: unable to unpack

Posted on September 23rd, 2011 | Posted by admin

Current issue with PEAR repositories affects upgrade from Magento to Magento via Magento Connect Manager and installation of some Magento extensions. The following error (or similar one) is shown in Magento Connect Manager on installation/upgrade:

ERROR: unable to unpack downloader/pearlib/download/AW_Blog-1.0.21.tgz

To solve the issue it is needed to forcibedly upgrade PEAR package to the latest version using the following CLI command:

./pear install -f PEAR

For new Magenting installations this command is included in the post-install script. If you notice this issue with your old Magento installation, please notify the Support Team to get this fixed.

How do I change the Magento Base URL?

Posted on September 23rd, 2011 | Posted by admin

The Magento Base URL is the URL used to access Store pages. It can be set on a per Store basis, so every Store could have its own Base URL.

Before starting the changes please make sure that the domain you wish to use as Base URL is already resolved to the IP-address of your Store (so either domain’s DNS servers or IP-address were set to Magenting’s servers). To verify that DNS changes are done, you can just open the domain name in browser. If DNS is set correctly it will redirect you to current Base URL (in subdomain).

To change the Magento Base URL you need to switch to Magento Admin Area and modify the Base URL at System > Configuration > Web > Unsecure > Base URL and System > Configuration > Web > Secure > Base URL.

Magento – Display Categories (with category images) in the homepage

Posted on September 23rd, 2011 | Posted by admin

$_helper    = $this->helper(‘catalog/output’);
$_category  = $this->getCurrentCategory();
$_imgHtml   = ”;

if ($_imgUrl = $_category->getImageUrl()) {
$_imgHtml = ‘<p><img src=”‘.$_imgUrl.’” /></p>’;
$_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, ‘image’);

Magento – Add Thumbnail Image in Transaction email

Posted on September 23rd, 2011 | Posted by admin

A client requested adding product thumbnail images in the Order Confirmation Email that is sent after a customer order a product.. Without much ado here’s the code…

<?php //added for sending image with order
$product = Mage::getModel(‘catalog/product’)
<p align=”center”><img src=”<?php echo Mage::helper(‘catalog/image’)->init($product, ‘image’)->resize(50); ?>” width=”50″ /></p>

add this snippet below <td align=”left” valign=”top” style=”padding:3px 9px”>

Magento shows blank/empty page. How do I solve this?

Posted on September 22nd, 2011 | Posted by admin

If you see a blank page opening your Store in browser, it indicates that there is a PHP syntax error somewhere in the code of your site. This usually happens when you modified files, templates or extensions manually, or installed a theme or more files packaged together to extend the functionality of Magento extension with PHP syntax errors.

To see the actual error message you need to login via FTP to your Store and use the following instructions:

  • Download the index.php file to your computer
  • Edit the downloaded index.php file and uncomment (by removing leading hash character) the following code:
    ini_set('display_errors', 1);

    or insert this line somewhere at the top of the file.

  • Upload the modified index.php file back (you can also rename original index.php to index.php.orig to be able to revert the changes)