Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Select group by custom field (not only id)
 
asrenzo
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-02-25
France
 

Hi,

I added a new field (aka mynewfield) in the group table. I customized the group management interface (using a local package of my own) to deal with this new field.

Now I need to retrieve one of this group during account creation relatively to a form field data (aka mynewfieldformvalue )

Is there a way to select a group from something else than his id ?

I know :

customerGroup->load($id)

but I wish I could use something like:

customerGroup->loadBy('mynewfield'$mynewfieldformvalue)

Regards,

Laurent

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Actually there’s optional 2nd argument to load() method to specify field to look by:

$customerGroup->load($mynewfieldformvalue'mynewfield');

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
asrenzo
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-02-25
France
 

Great, thank you moshe for this answer on a saturday

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53218 users|771 users currently online|107270 forum posts