/** * store form values. Special post-save proc for sending notifications. */ function store($vals) { $res = parent::store($vals); if (!PEAR::isError($res) or $res->getCode() == DBCON_ZERO_EFFECT) { if (!empty($vals['do_notify']) && !empty($vals['belongs_email'])) { $this->send_coupon_notification($vals['belongs_email'], $vals['belongs_name']); } } return $res; }
/** * store a new basis for the given method * @param $meth_id int the ship_method id * @param $min int minimum of the range * @param $max int max of the range * @param $cost int how much it will cost ya * @throws PE */ function store_basis($methid, $min, $max, $cost) { global $pdb; $dbc = new db_container($pdb); $dbc->set_table('cm_shipmethods_zone_costs'); $vals = array('cm_shipmethods_zone_methods_id' => $methid, 'basis_min' => $min, 'basis_max' => $max, 'cost' => $cost); return $dbc->store($vals, true); }