public function delete($arr) { if ($arr) { parent::delete($arr); parent::delete($arr, 'order_items'); } }
public function save($related_products, $parent_product_id) { $this->delete(array('parent_product_id' => $parent_product_id)); foreach ($related_products as $k => $v) { $ins['product_id'] = $v; $ins['parent_product_id'] = $parent_product_id; parent::save($ins); } }
public function get_row($opts, $table = '', $type = 'result', $protect = true) { $product_id = isset($opts['where']) ? $opts['where']['product_id'] : $opts['product_id']; ci()->load->model('admin/related_products_model'); $res = parent::get_row($opts, $table, $type, $protect); $related_products = ci()->related_products_model->format('product_id', array('parent_product_id' => $product_id)); $res['related_products'] = $related_products; $res['product_options'] = json_decode(base64_decode($res['product_options'])); return $res; }
public function __construct() { parent::__construct(); $this->table = 'production_stores'; }
public function __construct() { parent::__construct(); $this->table = 'allergies'; }
public function __construct() { parent::__construct(); $this->table = 'order_history'; }
public function __construct() { parent::__construct(); $this->table = 'members'; }
public function __construct() { parent::__construct(); $this->table = 'cards'; }
public function __construct() { parent::__construct(); $this->table = 'production_ingredients'; }
public function __construct() { parent::__construct(); $this->table = 'order_items'; }
public function __construct() { parent::__construct(); $this->table = 'sys_settings'; }
public function __construct() { parent::__construct(); $this->table = 'shipping_types'; }
public function __construct() { parent::__construct(); $this->table = 'reoccuring_orders'; }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->table = 'addresses'; }
public function __construct() { parent::__construct(); $this->table = 'shipping_schedule'; }