SHARE
TWEET

../Mobile/sql/mobile_setup/mysql4-install-0.1.0.php

pdonnelly21 Jan 21st, 2015 787 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $installer = $this;
  3. $installer->startSetup();
  4.  
  5.  
  6. $installer->addAttribute("customer", "mobile",  array(
  7.     "type"     => "varchar",
  8.     "backend"  => "",
  9.     "label"    => "Mobile Number",
  10.     "input"    => "text",
  11.     "source"   => "",
  12.     "visible"  => true,
  13.     "required" => false,
  14.     "default" => "",
  15.     "frontend" => "",
  16.     "unique"     => false,
  17.     "note"       => ""
  18.  
  19.         ));
  20.  
  21.         $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "mobile");
  22.  
  23.        
  24. $used_in_forms=array();
  25.  
  26. $used_in_forms[]="adminhtml_customer";
  27. $used_in_forms[]="checkout_register";
  28. $used_in_forms[]="customer_account_create";
  29. $used_in_forms[]="customer_account_edit";
  30. $used_in_forms[]="adminhtml_checkout";
  31.         $attribute->setData("used_in_forms", $used_in_forms)
  32.                 ->setData("is_used_for_customer_segment", true)
  33.                 ->setData("is_system", 0)
  34.                 ->setData("is_user_defined", 1)
  35.                 ->setData("is_visible", 1)
  36.                 ->setData("sort_order", 100)
  37.                 ;
  38.         $attribute->save();
  39.        
  40.        
  41.        
  42. $installer->endSetup();
RAW Paste Data
Top