Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The issue you have is related to type of attribute you've created. For making possible selection of your custom attribute in the admin, you need to create/update it with type 'select' and 'source_model' for it. For this purpose using of customer module setup model is required, so in your module configuration of setup resources you need to specify it:</p> <pre><code>&lt;config&gt; &lt;global&gt; &lt;resources&gt; &lt;your_module_setup&gt; &lt;setup&gt; &lt;class&gt;Mage_Customer_Model_Resource_Setup&lt;/class&gt; &lt;module&gt;Your_Module&lt;/module&gt; &lt;/setup&gt; &lt;/your_module_setup&gt; &lt;/resources&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>And in your setup file, you need to create/modify your attribute. (If attribute exists, current code snippet will modify it, instead of creation).</p> <pre><code>&lt;?php $this-&gt;startSetup(); $this-&gt;addAttribute('customer', 'partner_country' , array( 'type' =&gt; 'varchar', 'label' =&gt; 'Partner Country', 'input' =&gt; 'select', 'source' =&gt; 'customer/entity_address_attribute_source_country' )); $this-&gt;endSetup(); </code></pre> <p><strong>UPDATED:</strong></p> <p>Now I got your question, you haven't added your attribute to customer create account form, so your attribute is filtered out from data that is set to customer model during account creation process.</p> <p>So you simply need to specify your customer attribute for the form where it should be possible to save your attribute. </p> <p>Currently there are such forms available:</p> <ul> <li><strong>customer_account_create</strong> - Register Form </li> <li><strong>customer_account_edit</strong> - Change Account Details Form </li> <li><strong>checkout_register</strong> - Registering new account during checkout</li> </ul> <p>For adding your custom attribute to form, just create one more setup script, that add a record with form code and your attribute id to table called <code>customer/form_attribute</code>:</p> <pre><code>&lt;?php $this-&gt;startSetup(); $attributeId = $this-&gt;getAttributeId('customer', 'partner_country_id'); $data = array( array('attribute_id' =&gt; $attributeId, 'form_code' =&gt; 'customer_account_create'), array('attribute_id' =&gt; $attributeId, 'form_code' =&gt; 'customer_account_edit'), array('attribute_id' =&gt; $attributeId, 'form_code' =&gt; 'checkout_register') ); $this-&gt;getConnection()-&gt;insertMultiple($this-&gt;getTable('customer/form_attribute'), $data); $this-&gt;endSetup(); </code></pre> <p>Just opt-out the forms you don't need. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload