Magento Forum

   
“Unable to apply rules. Invalid website code requested: Array”
 
TheHox
Jr. Member
 
Total Posts:  4
Joined:  2012-05-14
 

Whenever I try and apply any “Catalog Price Rules” I get the following error:

“Unable to apply rules. Invalid website code requested: Array”

I originally added all my products etc in 1.6 and then updated my site to 1.7. I have 2 websites(stores) set up and a store is selected for the rule.

If anyone knows what to do to fix this, that would be great.

 
Magento Community Magento Community
Magento Community
Magento Community
 
amnesic
Jr. Member
 
Total Posts:  8
Joined:  2009-01-23
 

I had a similar trouble when I migrate my shop to 1.7

After investigation, I found that, -in my case-, it was probably cause by a problem during the salerule_setup upgrade process.

You should verify that you don’t have the website_id and customer_group_ids columns inside your salesrule/rule table.

If you still have this obsolete columns. You probably have like me a problem during this SQL upgrade :
app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php

\”
/**
* Create table \’salesrule/website\’ if not exists. This table will be used instead of
* column website_ids of main catalog rules table
*/
[...]
/**
* Create table \’salesrule/customer_group\’ if not exists. This table will be used instead of
* column customer_group_ids of main catalog rules table
*/
[...]
/**
* Eliminate obsolete columns
*/
$connection->dropColumn($rulesTable, \’website_ids\’);
$connection->dropColumn($rulesTable, \’customer_group_ids\’);
\”

Simply remove website_ids and customer_group_ids columns of salesrule table was enough for me to fix the problem.

Hope this helps,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top