2010-05-16 06:00:33Damodar Bashyal
I mistakenly canceled one order and spent a day to go through magento & different forums and blogs and searching for a solution and this is how i fixed myself after few tries. I am still not sure how to extend the controller so i modified the core file and made a copy so i can paste back if overwritten when upgrade or i can copy when i find the solution how to extend or override a magento controllers.
Create a file @ app\code\local\Codefight\Adminhtml\Block\Sales\Order\Grid.php
More»
2010-04-22 23:39:24Damodar Bashyal
How to add new fields in magento e-commerce?
There is no easy method like adding product attribute for category yet. But we can achieve this by adding from database. You just need to deal with three tables in the database.
First one is: eav_attribute
Insert details as: [change as you need]
More»
2010-03-23 18:34:57Damodar Bashyal
This is how i got the current page in magento. Hope this helps someone.
<?php
$current_page = '';
/*
* Check to see if its a CMS page
* if it is then get the page identifier
*/
if(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms'):
$current_page = Mage::getSingleton('cms/page')->getIdentifier();
endif;
/*
* If its not CMS page, then just get the route name
*/
if(empty($current_page)):
$current_page = Mage::app()->getFrontController()->getRequest()->getRouteName();
endif;
/*
* What if its a catalog page?
* Then we can get the category path :)
*/
if($current_page == 'catalog'):
$current_page = 'categorypath-' . preg_replace('#[^a-z0-9]+#', '-', strtolower(Mage::registry('current_category')->getUrlPath()));
endif;
?>
More»