如:一个订单总价,需要进行数量乘以单价的计算
OrderModel.class.php
protected $_auto = array(
array('amount','countAmount',1,'callback'),
);
public function countAmount(){
$price = $this->__get('price');
$quatity = $this->__get('quatity');
$amount = $price*$quatity;
return $amount;
}
没有成功。为什么?