Skip to main content
added 202 characters in body
Source Link
Fabian Blechschmidt
  • 35.4k
  • 8
  • 75
  • 182

Company is a customer_address attribute, therefore you have to decide wether it should be from the shipping or billing address or join both like the rest.

And group name, like this:

$collection->joinTable($collection->getTable('customer/customer_group'), 'group_id=customer_group_id''customer_group_id=group_id', array('customer_group_code'), null, 'left');

Didn't tested it ;-)

It is important to set as the condition the column of the joined table as first name.

I wrote a blog article about it: http://blog.fabian-blechschmidt.de/articles/Joining-a-flat-table-on-EAV.html

Company is a customer_address attribute, therefore you have to decide wether it should be from the shipping or billing address or join both like the rest.

And group name, like this:

$collection->joinTable($collection->getTable('customer/customer_group'), 'group_id=customer_group_id', 'customer_group_code', null, 'left');

Didn't tested it ;-)

Company is a customer_address attribute, therefore you have to decide wether it should be from the shipping or billing address or join both like the rest.

And group name, like this:

$collection->joinTable('customer/customer_group', 'customer_group_id=group_id', array('customer_group_code'), null, 'left');

Didn't tested it ;-)

It is important to set as the condition the column of the joined table as first name.

I wrote a blog article about it: http://blog.fabian-blechschmidt.de/articles/Joining-a-flat-table-on-EAV.html

Source Link
Fabian Blechschmidt
  • 35.4k
  • 8
  • 75
  • 182

Company is a customer_address attribute, therefore you have to decide wether it should be from the shipping or billing address or join both like the rest.

And group name, like this:

$collection->joinTable($collection->getTable('customer/customer_group'), 'group_id=customer_group_id', 'customer_group_code', null, 'left');

Didn't tested it ;-)