Zend Anwar

Full stack web developer

Category: Magento

Magento

Fatal error: Uncaught Error: Function name must be a string in app/code/core/Mage/Core/Model/Layout.php:555

This is because you need to clarify the `$callback` variable will be called as a method (function). The original bit of code was: (file app/code/core/Mage/Core/Model/Layout.php) Now you need to replace it with this with: 1 $out .= $this->getBlock($callback[0])->{$callback[1]}(); Don’t edit the files directly – instead create a separate extension which overrides Mage_Core_Model_Layout with your own […]

Read More

safari browser add to cart does not work in magento

Updated the the cookie lifetime in the admin console from 3600 to 86400 and this fixed the login and the add to cart in IE, Safari and iPhone. configuration->web->session cookie management->cookie lifetime

Read More

How to disable compilation in Magento

It can be done by two: 1. From Magento admin Navigate to System > Tools > Compilation page and click on Disable button Navigate to System > Cache Management screen and use Flush Cache button. 2. Via SFTP/FTP, by editing the includes/config.php file To disable compilation in Magento, edit includes/config.php. #define(‘COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’); define(‘COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

Read More

Magento: change to Product Name or Description not displayed on frontend

Try re-indexing data and flushing cache from Magento Admin. System -> Index Management System -> Cache Management If does not working please check following step: Please goes to Manage Attribute Select “short description”, “description” & “Name” and Scope should be changed “Global” This solved my problem.

Read More

What happens when existing orders are edited in the Magento admin

When an order is edited in admin, that order gets cancelled and new order with edited data is created again

Read More

How to Set Custom Title to the Success page in Magento

Copy checkout.xml file from app/design/frontend/base/default/layout/checkout.xml to app/design/frontend/default/yourtheme/layout/checkout.xml under checkout_onepage_success tag <reference name=”head”> <action method=”setData” translate=”title”><key>title</key><value>your title </value></action> </reference>

Read More

please enter a valid url. protocol is required (http // https // or ftp //) in magento instaltion

For this you need to remove the validation for the particular section. 1. Open \app\design\install\default\default\template\install\config.phtml 2. Find the textbox where the base url is entered. It will be around line no 85 with name ‘config[unsecure_base_url]‘ 3.  Remove ‘validate-url’ from its class and save the file. Replace <li> <label for=”base_url”><?php echo $this->__(‘Base URL’) ?> <span class=”required”>*</span></label><br […]

Read More

How to get data from Magento System Configuration?

<?php Mage::getStoreConfig(‘sectionName/groupName/fieldName’); ?>

Read More

How to get attribute set name in Magento?

<?php Mage::getModel(‘eav/entity_attribute_set’)->load($_product->getAttributeSetId())->getAttributeSetName(); ?>

Read More

Get custom attribute value in Magento

$attribute=$_product->getResource()->getAttribute(‘custom_attribute_code’); if ($attribute) {     echo $attribute_value = $attribute ->getFrontend()->getValue($_product); } Hope it will you.

Read More