Exemple #1
0
 protected function _multiDeactivate($id)
 {
     $object = new Wpjb_Model_Discount($id);
     $object->is_active = 0;
     $object->save();
     return true;
 }
Exemple #2
0
 protected function _useCouponCode()
 {
     if ($this->discount_id < 1) {
         return;
     }
     $discount = new Wpjb_Model_Discount($this->discount_id);
     if (!$this->id) {
         return;
     }
     $discount->used++;
     $discount->save();
 }