Example #1
0
 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);
     }
 }
Example #3
0
 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';
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'allergies';
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'order_history';
 }
Example #7
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'members';
 }
Example #8
0
 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';
 }
Example #11
0
 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';
 }
Example #14
0
 public function __construct()
 {
     parent::__construct();
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'addresses';
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'shipping_schedule';
 }