14 votes
Accepted

What is required to make $this->renderLayout(); work?

Short answer: Every controller action has an associated layout handle and the handle is a string which relates to the module, the controller and the action for the current request (and is therefore ...
14 votes
Accepted

Applied PATCH_SUPEE-6285 - Do I need to do anything else?

There's a series of changes you need to make in addition to just running the patch. I've used the 1.9.1.1 patch as an example here, but sadly, the patches differ dependent on release. Custom template ...
  • 17.6k
13 votes

Geting Fatal error: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

The usual cause when you get MySQL server has gone away is timeout errors and max_allowed_packet being set too low. These are settings that will have to be made to your system’s my.cnf file by your ...
  • 7,583
7 votes

How to check if customer is already subscribed to newsletter

You have to check also the subscription status: if(Mage::getSingleton('customer/session')->isLoggedIn()){ $email = Mage::getSingleton('customer/session')->getCustomer()->getData('...
7 votes

Magento Upgrade/Roadmap/Migration from 1.9 to 2.0

Here is resources what we have so far for migration to Magento 2: Official migration M1 to M2 guide - http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html Official data migration ...
  • 2,100
5 votes

Add product to cart from email link

You should create your own module for this with the product sku/id as a parameter. Code might look something like this: $id = '100'; // Get the id with $this->getRequest()->getParam('id') $qty ...
  • 7,343
5 votes

Magento/Apache internal redirects hang the server

If you are facing this problem, You have to commment the line in .htaccess file. # RewriteBase /magento/ or Set the RewriteBase in .htaccess file. RewriteBase / I have tested this in Magento 2
5 votes
Accepted

Secure store url with store code in CMS page or block

Try this: <a href="{{store direct_url="" _secure=1}}">Some text</a> if that does not work try <a href="{{store direct_url="" _force_secure=1}}">Some text</a>
  • 196k
5 votes
Accepted

Payment methods "Wrong content type" after upgrade Magento from 1.6 to 1.9.1.1

As you may have noticed in the given source code, the exception is thrown because null is not an allowed value for $contentType. $contentType is read from the system configuration: $contentType = $...
  • 2,933
5 votes
Accepted

Customer password not working after migration from Magento 1 to Magento 2

"The data migration tool takes advantage of such backward compatibility in Magento to automatically migrate Customer password from Magento 1 to Magento 2. So your customers can use their md5() ...
  • 1,043
4 votes

How to check if customer is already subscribed to newsletter

In my opinion none of the above answers are very convenient in that they either don't check if the customer is actually subscribed or don't handle the case where a subscription has not been found, so ...
  • 1,063
4 votes

Unexplained error occured

You have a typo: Mage:log($error_message); should be: Mage::log($error_message); Note the extra :.
4 votes

checkout_type_onepage_save_order_after event issue

Transaction Flow is bit different in case of "Express Checkout". I suggest you to use sales_order_place_after event and use payment method code to check for suitable payment method: $orderObject = $...
  • 103
4 votes

Magento Upgrade/Roadmap/Migration from 1.9 to 2.0

It is not possible to upgrade Magento 1.x store to Magento 2, but it is possible to migrate data from an existing Magento 1.x store to a new Magento 2 store. There is the official data migration tool: ...
3 votes

Getting thumbnails in wishlist to use parent image

What your trying to do will require a lot of work Take a look at /app/design/frontend/default/[theme]/template/checkout/cart/item/default.phtml To get the correct image magento uses <img src="&...
3 votes

Send automatic email when placing customer in a customergroup

It ought to be possible to hook into the customer_save_after or adminhtml_customer_save_after event, then compare getData('customer_group_id') vs getOrigData('customer_group_id') to see whether it was ...
3 votes
Accepted

Payflow percentage discount issue

Finally I fix it myself. I requested Patch from Magento from one of my Enterprise project PATCH_SUPEE-1474_EE_1.12.0.2_v1.sh and find and replace the code lines manually . This patch fixed my paypal ...
3 votes
Accepted

Why do special characters in search terms are processed as encoded characters (only on Production Server)?

The first thing I noticed was that the search returns an 301 redirect with the HTTP header Content-Type: text/html; charset=iso-8859-1 and the wrong URL http://caserisimo.mx/catalogsearch/result?q=br%...
3 votes
Accepted

Shipping tax only for certain states

This article is for Magento 1.8, but this hasn't changed much between 1.6 and 1.8. http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-tax-config-us EDIT: Answer from below: So I ...
  • 682
3 votes

Geting Fatal error: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

You need to increase the limit of max_allowed_packet of your mysql to say 30M or something. In my linux installation this can be found in /etc/mysql/my.cnf file.
3 votes
Accepted

How do I add watermark programmatically?

You could manually create the watermark image and store them in a separate folder, then use the url to these images in your email See Magento: Create Watermark Image // update with path to product ...
3 votes

Spammed with fake user registration

You could possibly add what one would call a 'bot trap' into your registration page. You see, bots don't have eyes. And without eyes the only way to fill out a form is via field automation. ...
3 votes

Product Review post action rewriting not working

for overriding the controller.create a custom module. Step 1: Create a module xml yourpackgename_modulename.xml file at the app/etc/modules with the following content. <?xml version="1.0" ?> &...
3 votes
Accepted

Getting a sudden error on Magento backend / frontend

If you want to delete/deactivate any extension, then first place to look at is etc/modules. You have to find corresponding file of extension and delete it. Or simply open it and set <active>...
3 votes

Applied PATCH_SUPEE-6285 - Do I need to do anything else?

Look at the changes that have been made to the template files. If your custom theme contains these templates (which is most likely with the cart.phtml template), you have to apply the same changes ...
3 votes
Accepted

Magento 1.6 /admin always redirects to store after SUPEE-9767

I've literally just spent most of my afternoon debugging this issue. The issue only occurs when https is enabled (which might explain why it doesn't occur in your dev environment). Line 835 of ...
3 votes

Customer password not working after migration from Magento 1 to Magento 2

After migrating database from magento1 to magento2, customer login problem occurs, to solve that problem just go to a file name encryptor.php in the vendor folder (Path is below) vendor\magento\...
2 votes

How to check if customer is already subscribed to newsletter

To extend @Mufaddal's answer: $subscriberModel = Mage::getModel('newsletter/subscriber')->loadByEmail($email); $subbed = ($subscriberModel->isSubscribed() ? true : false); This way you check ...
2 votes

fatal error: Call to a member function getCollection() on a non-object in magento

Sometime if you try to un-insall any extension (for me its was 'Mgt_DeveloperToolbar') by manually delete all related files but still you need to clear data from 'core_resource' table.
2 votes

Huge pdo_mysql.log - turning off logging doesn't stop it from growing

This logging should be off by default in a clean install of magento so it sounds like someone has previously modified this file to turn this setting on. That said, now that logging is disabled I see ...
  • 3,438

Only top scored, non community-wiki answers of a minimum length are eligible