I have the following php code (running under magento 1.7.0.2) that finds a customer group with a particular code. The code works fine for groups that have no spaces in the code value, however it will not find any groups with a space in the code value, Can you locate the reason?
I don't want to change the code to use the group ID as this is not practical in this situation, can anyone help?
$theGrous = Mage::getModel('customer/group')->getCollection()->addFilter('customer_group_code', $groupName);
For example when the variable $groupName is 'Standard' I find results, when it is 'Standard Rate' I don't get it as it, this happens for any codes with spaces in them
thanks