예제 #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);
     }
 }
예제 #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';
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'allergies';
 }
예제 #6
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'order_history';
 }
예제 #7
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'members';
 }
예제 #8
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'cards';
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'production_ingredients';
 }
예제 #10
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'order_items';
 }
예제 #11
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'sys_settings';
 }
예제 #12
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'shipping_types';
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'reoccuring_orders';
 }
예제 #14
0
 public function __construct()
 {
     parent::__construct();
 }
예제 #15
0
 public function __construct()
 {
     parent::__construct();
     $this->table = 'addresses';
 }
 public function __construct()
 {
     parent::__construct();
     $this->table = 'shipping_schedule';
 }