Exemplo n.º 1
0
 public function find($id = NULL)
 {
     $p = parent::find($id);
     //		$p->shipping_info = (empty($p->shipping_info))? array() : unserialize($p->shipping_info);
     $p->attributes = empty($p->attributes) ? array() : unserialize($p->attributes);
     $p->options = empty($p->options) ? array() : unserialize($p->options);
     $p->tax_ids = empty($p->tax_ids) ? array() : unserialize($p->tax_ids);
     return $p;
 }
Exemplo n.º 2
0
 public function find()
 {
     $this->where('prefix', '!=', Model_Location::RESERVED_LOCATION);
     return parent::find();
 }
 /**
  * Finds and loads a single database row into the object.
  *
  * @chainable
  * @param   mixed  primary key or an array of clauses
  * @return  ORM
  */
 public function find($id = NULL)
 {
     if (Kohana::config('versions.version') == 'max') {
         $w = new Database_Expression('(SELECT max(version) FROM ' . $this->table_name . ' AS q WHERE ' . $this->table_name . '.pid=q.pid)');
     } else {
         $v = versions_helper::get_published_version();
         $w = new Database_Expression('(SELECT max(version) FROM ' . $this->table_name . ' AS q WHERE ' . $this->table_name . '.pid=q.pid AND version <= ' . $v . ')');
     }
     $this->db->where('version', $w);
     $this->db->where('state!=', 'D');
     return parent::find($id);
 }
 public function find($id = NULL)
 {
     $res = parent::find($id);
     $res->data = json_decode($res->data, TRUE);
     return $res;
 }
Exemplo n.º 5
0
 public function find($id)
 {
     $p = parent::find($id);
     return $p;
 }
Exemplo n.º 6
0
 /**
  * get the lat/lon from a city
  *
  * @param string $city 
  * @return false/object
  * @author Andy Bennett
  */
 public function latlon_from_city($id = NULL, $city)
 {
     $this->like(array("district" => $city));
     return parent::find($id);
 }
 /**
  * Model_Base::find()
  * apply filters and sorts before find
  * 
  * @return
  */
 public function find()
 {
     $this->apply_filters();
     $this->apply_sorts();
     $this->apply_amount();
     $this->apply_skip();
     return parent::find();
 }