Example #1
0
 /**
  * Modify money 
  * 
  * @param float                $value     Value
  * @param \XLite\Model\AEntity $model     Model
  * @param string               $property  Model's property
  * @param array                $behaviors Behaviors
  * @param string               $purpose   Purpose
  *  
  * @return void
  */
 public static function modifyMoney($value, \XLite\Model\AEntity $model, $property, array $behaviors, $purpose)
 {
     foreach ($model->getOptions() as $option) {
         if ($option->getOption() && $option->getOption()->hasActiveSurcharge('price')) {
             $value += $option->getOption()->getSurcharge('price')->getAbsoluteValue();
         }
     }
     return $value;
 }