Пример #1
0
 public function _install()
 {
     $this->db->where('name', 'digital_products')->update('components', array('autoload' => '1', 'enabled' => '1'));
     $field = new CustomFields();
     $field->setEntity('Product')->setIsActive(true)->setname('dplink')->setfLabel('Link to digital content')->settypeId(3);
     $field->save();
     ShopCore::app()->SSettings->set('DPLinkCFID', $field->getId());
     /** We recomend to use http://ellislab.com/codeigniter/user-guide/database/forge.html */
     /**
      $this->load->dbforge();
     
      $fields = array(
      'id' => array('type' => 'INT', 'constraint' => 11, 'auto_increment' => TRUE,),
      'name' => array('type' => 'VARCHAR', 'constraint' => 50,),
      'value' => array('type' => 'VARCHAR', 'constraint' => 100,)
      );
     
      $this->dbforge->add_key('id', TRUE);
      $this->dbforge->add_field($fields);
      $this->dbforge->create_table('mod_empty', TRUE);
     */
     /**
      */
 }