static function simpan($varID, $type) { $mp = new MProdLog(); $mp->plog_date = leap_mysqldate(); $mp->plog_variantID = $varID; $mp->plog_type = $type; $mp->save(); }
function updateBought() { $this->fg_bought = $this->fg_bought + 1; $this->fg_cb = round($this->fg_bought / $this->fg_carted, 3); $this->fg_vc = round($this->fg_carted / $this->fg_viewed, 3); $this->save(1); MProdLog::simpan($this->VariantID, 2); }