Saturday, March 28, 2015

Magento Error: You cannot define a correlation name 'my_attribute' more than once

When you call "catalog/layer_view" module twice, this type of error is generated.

You need to search 'type="catalog/layer_view"' in your xml files and remove the block which you don't need. This will fix the error that 'You cannot define a correlation name 'my_attribute' more than once'.

Redirect to cms page after subscription of Newsletter

You can redirect to any page after subscription of newsletter.


Copy 
app\code\core\Mage\Newsletter\controllers\SubscriberController.php
to
app\code\local\Mage\Newsletter\controllers\SubscriberController.php


Open created file and search this code: $this->_redirectReferer();

and replace it to following code to redirect to your cms page.

$this->_redirectUrl(Mage::getBaseUrl().'cms-page-Identifier');


you can redirect it to base url by using following code instead of above.

$this->_redirectUrl(Mage::getBaseUrl());

Delete/Remove System Attribute

There is no option to delete or remove system attribute in magento admin.

I would suggest not to delete any system attribute. But as per client's requirement if you want to remove some attribute then you need to do following settings:

1) Go to PhpMyAdmin.
2)  Go to your database.
3) Go to eav_attribute table.
4) Search your attribute_code.
5) Edit that attribute_code's row.
6) Set 1 in 'is_user_defined' column.
7) After setting 1, you can go to magento admin. Here, you will find that the attribute which is set 1 for 'is_user_defined'  is no longer remain system attribute.so you are now able to delete it.

I will suggest you that do not delete any attribute if you don't want. Better to remove it only from desired attribute set if you don't require it.

Set session time out limit for magento frontend

You can set session time out limit from magento admin for front end by doing following settings:

Go to System->Configuration->Advanced->Admin->Security and set the session lifetime.This time is number of seconds.

Authorize.net gateway Test Account Setup

Once you have test account of authorize.net, you need to do following settings in magento admin.

Magento admin > System > Configuration >sales > Payment method > expand Authorize.net

Here, you need to enter your test account's Login Id and Transaction key.

The most important configuration is Gateway URL for test account.

For Test account Gateway URL is:

If you do not change gateway url for test account then magento will show following error and you will not able to finish transaction:
The merchant login ID or password is invalid or the account is inactive.

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

While development of magento application,  many times we get following error:

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

You need to delete  maintenance.flag file in root folder of magento to fix this problem.

When Magento is performing certain tasks, it temporarily creates maintenance.flag file which should be deleted automatically once processing  task get finished but sometimes this file don't get deleted and remain on root folder which causes above error. So, simply delete  this file to get back to development again!


Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...