示例#1
0
 public function getPredictedPointsEarned()
 {
     if ($this->product) {
         $earnable = $this->product->getEarnablePoints();
     } else {
         $earnable = array();
     }
     return $earnable;
 }
示例#2
0
 /**
  * Fetches a points model from a product.
  * TODO: Ideally the product should reutnr the points model.
  *
  * @param TBT_Rewards_Model_Catalog_Product $product
  * @return TBT_Rewards_Model_Points
  */
 public function _genPointsModel($product)
 {
     $points = Mage::getModel('rewards/points');
     $points->add($product->getEarnablePoints());
     return $points;
 }