I came across this issue, which admittedly may have a small affect for Magento installations, but it’s something that was reported by a team member and bugged me that I couldn’t find the answer. Well at first – I figured it out.

Contents
The Issue
The conditions dropdown for rules in the Amasty Shipping Restrictions configuration does not show all of the options – it’s missing the Customer Attributes sub-menu.
Identifying the Issue
I was patching the Amasty Shipping Restrictions module for the SUPEE-6788 patch on a development server. A coworker was testing setting up a shipping restriction rule and when choosing an option from the dropdown the page would redirect to the dashboard page. The issue here was that I had a bad reference in the module that needed to be updated yet.
Though that was an un-related issue, it made me compare the functionality between the development and production servers and noticed that while I corrected the redirection issue, there were items missing from the menu.
Versions
- Magento Enterprise Edition version 1.14.2.0
- This bug only exists on Magento Enterprise
- Amasty Shipping Restrictions version 1.1.2
- I do have a copy of the most recent version of the Amasty Shipping Restrictions extension, version 1.1.8, and have verified this bug exists in that codbase as well. For various business reasons I have chosen to manually patch the extension as oppose to upgrade to the most recent version.
Configuration
- Configuration -> Customers -> Customer Configuration -> Customer Segments -> Enable Customer Segment Functionality
- Yes

What’s Happening
By enabling the configuration setting above, the Customer Segments option is added to the dropdown.
The Shipping Restrictions module then attempts to add the Customer Attributes category with it’s sub-options to the dropdown.

I say attempts because the bug in the Amasty Shipping Restrictions module prevents this from actually happening.
The getNewChildSelectOptions() method in:
1 | app/code/local/Amasty/Shippingrestrictions/Model/Condition/Combine.php |
Will combine the already defined dropdown options with the Customer Attribute submenu options that are available to the Amasty Shipping Restrictions module. This is an overridden method originally defined in:
1 | app/code/core/Mage/Rule/Model/Condition/Combine.php |
On line 32
1 | Mage::dispatchEvent('salesrule_rule_condition_combine', array('additional' => $additional)); |
will trigger an observer than will actually do the work of combining the dropdown options. This is TRYING to call an observer defined in:
1 | app/code/local/Amasty/Shiprestriction/etc/config.xml |
1 2 3 4 5 6 7 8 9 | <salesrule_rule_condition_combine> <observers> <amasty_shiprestriction_model_observer> <type>singleton</type> <class>amshiprestriction/observer</class> <method>handleNewConditions</method> </amasty_shiprestriction_model_observer> </observers> </salesrule_rule_condition_combine> |
And this is where we finally get to the flaw. The observer, salesrule_rule_condition_combine, is already defined by the Enterprise Customer Segment module.
1 | app/code/core/Enterprise/CustomerSegment/etc/config.xml |
Because there are two observers with the same name, only one can get used and the Enterprise module wins. So because the configuration is set to add Customer Segments the Shipping Restrictions module doesn’t correctly combine it’s options into the dropdown. However, if you had the Customer Segments option set to no, then the Customer Attributes would show in the dropdown.
The Fix for the Bug
The solution to this bug is simple really – the name of the observer for the Amasty Shipping Restrictions extension needs to be changed to not conflict with the Enterprise module.
This solution will call two observers – one for the Amasty Shipping Restrictions module to add the Customer Attributes submenu and then to the Enterprise Customer Segment module which will add the Customer Segments options.
Change the Observer Name
File:
1 | app/code/local/Amasty/Shiprestriction/etc/config.xml |
Change This:
1 2 3 | <salesrule_rule_condition_combine> ... </salesrule_rule_condition_combine> |
To This:
1 2 3 | <amshiprestriction_salesrule_rule_condition_combine> ... </amshiprestriction_salesrule_rule_condition_combine> |
Call the New Observer Name
File:
1 | app/code/local/Amasty/Shippingrestrictions/Model/Condition/Combine.php |
Add this line on line 33:
1 | Mage::dispatchEvent('amshiprestriction_salesrule_rule_condition_combine', array('additional' => $additional)); |
For clarity sake, this should be added after this line:
1 | Mage::dispatchEvent('salesrule_rule_condition_combine', array('additional' => $additional)); |
Clear the Cache
Because we made a modification to the XML you’ll need to choose System -> Cache Managmeent and clear the following caches:
- Configuration
- Layotus
- Blocks HTML Output
Now, refresh the Amasty Shipping Restrictions rules page and you’ll see all of the desired options in the dropdown.