Skip to content

Instantly share code, notes, and snippets.

@ryaan-anthony
Created September 9, 2013 07:04
Show Gist options
  • Select an option

  • Save ryaan-anthony/6492310 to your computer and use it in GitHub Desktop.

Select an option

Save ryaan-anthony/6492310 to your computer and use it in GitHub Desktop.
<?php
class Mdunbar_Loyalty_Model_Entity_Setup extends Mage_Eav_Model_Entity_Setup
{
public function getDefaultEntities()
{
return array(
'customer' => array(
'entity_model' => 'customer/customer',
'attribute_model' => 'customer/attribute',
'table' => 'customer/entity',
'additional_attribute_table' => 'customer/eav_attribute',
'entity_attribute_collection' => 'customer/attribute_collection',
'attributes' => array(
'loyalty_card_number' => array(
'label' => 'Loyalty Card Number',
'type' => 'varchar',
'input' => 'text',
'visible' => true,
'required' => false,
'position' => 1,
'user_defined' => 1,
),
/* etc etc...*/
/* 'opt_in' => array(
'label' => 'Opt In',
'input' => 'boolean',
'type' => 'int',
'visible' => true,
'required' => false,
'position' => 1,
)*/
)
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment