Category » Magento

How to change the default sorting on product listing page in Magento?

Listing

In Magento you can change the default sorting attribute for product listing page from Magento admin.

To set the sorting attribute login to Magento admin and follow the following steps:

1. Go to Admin >> System >> Configuration >> Catalog
2. Expand the “Frontend” Section
3. Make selection from the “Product Listing Sort by” dropdown
4. Click the “Save Config” button.

Continue reading »

How to set/change the position of products in product listing page in Magento?

Sorting

In order to promote certain products, you may want to place them at the top in the category product listing page. Lets see how to set/change the position of the products from Magento admin.

To set/change the position of the products proceed as below:

1. Login Magento admin and follow the path Admin >> Catalog >> Manage Categories.
2. Click on a category in the category tree to display the category related information.

Continue reading »

How to overwrite system.xml file in Magento

XML

At times we need to add new configurations options or modify some option in an existing module, lets see how to do it in this article. Suppose we have to add a new field “Surcharge” to the Payment Method “Cash on Delivery” configuration options and modify the “Instructions” option label to “Message”.

To do this we have to create a new module.

1. We create a file “Techawaken_Cod.xml” in folder app\etc\modules\ to declare the module. The content of the file is shown below:


<?xml version="1.0"?>
<config>
<modules>
<Techawaken_Cod>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Payment />
</depends>
</Techawaken_Cod>
</modules>
</config>

Continue reading »

How to change the logo image in Magento

Magento

Its very easy and simple to change the logo image in Magento. In default Magento theme logo image is picked up from the {{Magento_Root}}/skin/frontend/default/default/images/logo.gif.

One option is to create gif image of you logo and name it logo.gif and upload it in the {{Magento_Root}}/skin/frontend/default/default/images/ folder to overwrite the old logo image file.

Continue reading »

Check server compatibily with Magento

Check

As discussed earlier in post “Magento System Requirements”, Magento has certain has certain server/software requirements which must be met in order to install and run it.

You can test your server for compatibility by following these simple steps:

  • Download the magento-check file to your computer and unzip it. You can download the file from Magento or GitHub.
  • Upload the extracted magento-check.php file to the web server directory where you will be installing Magento. In case you have already uploaded Magento files on your server then upload the magento-check.php file to the Magento directory.

Continue reading »

PHP Warning: include(): realpath failed to canonicalize

Warning

I was getting the following warnings when I was running Magento shell scripts from the command line using PHP CLI (PHP Command Line Interface).


PHP Warning:  include(): realpath failed to canonicalize Mage/Core/Model/App.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

PHP Warning:  include(): realpath failed to canonicalize Varien/Event/Collection.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

PHP Warning:  include(): realpath failed to canonicalize Varien/Event/Observer/Collection.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

To remove this warning I started debugging Magento code but no success. Then I googled and came across various posts/forums saying that it was possibly due to APC.

Continue reading »

How to reset Magento admin password?

Password

In case you have forgot your Magento admin password and need to reset it then you can use the forgot password link provided in the login screen or you can directly reset it in the database.

On the “Forgot your password” screen enter admin user email address and click “Retrieve Password” button, an email will be sent with link to reset your password.

Continue reading »

How to remove index.php from url in magento?

http

Magento uses the Front Controller pattern, all of its page request go through a single entry point index.php. If you prefer to hide the “index.php” part in the URLs you need to enable web server rewrites in Magento admin.

A URL like “http://www.testmagento.com/electronics/cell-phones.html” is much more user friendly than “http://www.testmagento.com/index.php/electronics/cell-phones.html”, it also hides the fact that the page displayed is a PHP page so hiding “index.php” in URLs is good for security purpose. Hiding “index.php” does not affect website performance in any way neither it affects search engine rankings.

Continue reading »

How to enable “Magento Profiler” and use it to identify Magento Performance bottlenecks

Optimize Performance

Magneto comes with a very useful debugging tool for developers called “Profiler”. It can be used to identify issues in your code making the website slow. The Magento “Profiler” reports the time taken by block of code under test to execute, the number of times the block of code executed and the memory used by it while rendering a Magento web page.

By default Magento Profiler is disabled, let see how to enable it.

How to enable “Profiler” in Magento?

To enable “Profiler” in Magento, you have to go through 2 parts:

Part A

1) Go to Admin >> System >> Configuration.

2) Under the “Advanced” tab, click the “Developer” link to open the developer section.

3) Now expand the “Debug” block and select “Yes” in the Profiler dropdown.

4) If you are debugging in a live environment then its better to restrict the profiler output display to the developers only so that customers browsing your website do not see any differences on the frontend. To do so expand the “Developer Client Restrictions” block and add the developer IPs comma separated in the text box provided.

5) Save the configuration.

Continue reading »

Magento Admin – “This account is locked.”, how to unlock it?

Magento Admin Locked

In Magento Enterprise Edition a security feature has been implemented which allows you to set the number of failed login attempts after which your account will get locked.

To make these security setting go to  Admin >> System > Configuration, click the Admin tab in the left column, and select the Security section.

Continue reading »

Back to top