Category » Magento

Deleting test orders in Magento

Magento Order

During development and testing of your Magento based e-commerce website you do a lot of test orders. Before going live you want to delete all of them but unfortunately you have no option in Magento admin to delete the orders, you can only change the orders status to “Canceled”.

You can log in to phpMyAdmin or MySql console, select your database and then run queries to delete you orders in Magento. Alternatively you can try Magento Connect extension “Seamless Delete Order”. It allows you to delete order from Magento admin, it adds a “Delete Order” option in the Actions dropdown on the Sales Order Grid Page.

Continue reading »

Cannot add more than 1000 products using Magento admin category management interface

Category Products

Many people having a large catalog have faced a problem in Magento “Catalog Management” that they are not able to  assign more than 1000  products under a category using the Magento admin category management interface.

The category management interface allows you to select as many products as you want.  If you have selected more than 1000 products and then you click on the “Save Category” button, the forms submits without any error displayed on the frontend. But if you see the products actually assigned to category in the grid displayed,  it may happen that all the ones you selected have not been assigned to the category but only the first 1000 selected are.

The issue is logged in Magento bug tracking list – Issue #27321 Can’t save categories with more than 1000 products [http://www.magentocommerce.com/bug-tracking/issue?issue=13203]

Continue reading »

Cannot login in admin even after entering the correct username and password

Magento Admin Login

After setting up the Magento Community Edition (ver. 1.7.0.2) on my local machine for development, I found that I am not able to login in to the admin section. I entered correct username and password but  it redirected me back to the same admin login page with no error message. If I enter incorrect login details it does give me the error “Invalid User Name or Password”. I am using Windows Xp and Xampp Version 1.8.1 (Apache 2.4.3, MySQL 5.5.27, PHP 5.4.7) and I was accessing my Magento admin using url “http://locahost/magento/index.php/admin”.

One of my friends faced the issue that he was able to login in Firefox  but not in Chrome.

Continue reading »

Magento: Get Base Url, Skin Url, Js Url, Media Url, Store Url

Retrieving URLs in Magento

1. Get Base URL

<?php
$base_url = Mage::getBaseUrl();
?>

2. Get Current URL

<?php
$current_url = Mage::helper('core/url')->getCurrentUrl();
?>

3. Get Home URL

<?php
$home_url = Mage::helper('core/url')->getHomeUrl();
?>

4. Get Store URL

<?php
$store_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
?>

5. Get Media URL

<?php
$media_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
?>

Continue reading »

Modifying the response in Magento before its displayed on browser

Magento uses a response object to send all output. All output is added to this object, and then its sendResponse method is called.  If you need to modifying the response in Magento before its displayed on browser then you can listen to the event “http_response_send_before” and modify the output in the observer method.

Continue reading »

Magento – AJAX "Headers already sent" error solved

While working with AJAX in Magento many of you might have received the following error like I did:

2013-05-02T10:25:15+00:00 DEBUG (7): HEADERS ALREADY SENT:
[0] /var/www/html/ecomm/app/code/core/Mage/Core/Controller/Response/Http.php:44
[1] /var/www/html/ecomm/lib/Zend/Controller/Response/Abstract.php:727
[2] /var/www/html/ecomm/app/code/core/Mage/Core/Controller/Response/Http.php:75
[3] /var/www/html/ecomm/app/code/core/Mage/Core/Controller/Varien/Front.php:188
[4] /var/www/html/ecomm/app/code/core/Mage/Core/Model/App.php:304
[5] /var/www/html/ecomm/app/Mage.php:599
[6] /var/www/html/ecomm/index.php:104

Continue reading »

Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct()

In one of our Magento projects, on development environment everything was working fine but when the site was live “Invoice” print in magento admin [Admin >> Sales >> Orders >> Invoice tab >> Open Invoice >> Click print button] was giving Fatal Error.

We though that we might have missed some file when moving to live site but ultimately we found that code base was same.

Continue reading »

Overriding Magento admin theme files

We create a new theme and assign it in the Magento admin to override the frontend theme. What if you need to override the admin theme file? Edit the default magento file? No, its not a good practise.

Continue reading »

Adding English (India) locale

We were working on a eCommerce website based on magento for INDIA. Magento allows the locale from admin, the path to be followed is Admin >> System >> Configuration >> General >> Locale. In the “Locale” dropdown it has option for English (United States), English (United Kingdom), Hindi (India) etc. but no option for English (India).

Continue reading »

Order address edit log not maintained in Magento Enterprise edition

Magento admin has a logging module that records actions performed in Magento admin. It is a very useful module when the admin is used by multiple persons and you want to track the changes made in admin. You have the option to select which of the admin actions are logged. To select/modify the admin actions to be logged go to Admin >> System >> Configuration >> Advanced >> Admin, check the checkbox next to any actions that you want to be logged in the log file.

Continue reading »

Back to top