$configData = Mage::getStoreConfig( 'sectionName/groupName/fieldName', Mage::app()->getStore() );
Tuesday, April 30, 2013
How to get store configuration data from Magento System Configuration?
Wednesday, April 17, 2013
How to create custom page in my account magento page
In your module's config file include your custom layout files using layout updates.
In your custom layout file include the below script(preferredlocation.xml).preferredlocation.xml
Preferred Location preferredlocation/edit
Display my account navigation links in my account sidebar
In your custom layout file include the below script.
Preferred Location preferredlocation/edit
Thursday, October 11, 2012
Can not login to magento admin and frontend
Im using centos. I had a problem, Magento frontend and admin login doesn’t work and loops back to login with no message.
This happens because of session cookie problem.
I solved this problem by installing ntp
In your shell type the below command to install ntp # yum install ntp Turn on ntp service # chkconfig ntpd on Synchronize system clock with 0.pool.ntp.org server: # ntpdate pool.ntp.org Start the NTP service: # /etc/init.d/ntpd start
Now check whether this has solved the cookie problem. If not try the following. comment the below lines in "/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php".
if (!$cookieParams['httponly']) { unset($cookieParams['httponly']); if (!$cookieParams['secure']) { unset($cookieParams['secure']); if (!$cookieParams['domain']) { unset($cookieParams['domain']); } } } if (isset($cookieParams['domain'])) { $cookieParams['domain'] = $cookie->getDomain(); }
Wednesday, April 11, 2012
How to get attribute code in magento filter.phtml file?
$attribute_code = $_item->getFilter()->getAttributeModel()->getAttributeCode();
Labels:
attribute code,
filter,
filter.phtml,
get,
Magento
Thursday, March 8, 2012
How to get special price end date in magento?
Here is the code to get special price end date in magento.
$this->formatDate($product->getSpecialToDate())
How to get special price or offer price in magento?
Here is the code to get special price in magento.
$price = $_product->getPrice(); $specialprice = $_product->getFinalPrice(); if($specialprice != $price) { //your stuff here echo $specialprice; }
Subscribe to:
Posts (Atom)