function getUnitPrice($recalculate = false)
 {
     $unitPrice = 0;
     if ($this->priceHasBeenFixed($recalculate) && !$recalculate) {
         $unitPrice = parent::getUnitPrice($recalculate);
     } elseif ($productVariation = $this->ProductVariation()) {
         if (!isset(self::$calculated_buyable_price[$this->ID]) || $recalculate) {
             self::$calculated_buyable_price[$this->ID] = $productVariation->getCalculatedPrice();
         }
         $unitPrice = self::$calculated_buyable_price[$this->ID];
     } else {
         $unitPrice = 0;
     }
     $updatedUnitPrice = $this->extend('updateUnitPrice', $unitPrice);
     if ($updatedUnitPrice !== null && is_array($updatedUnitPrice) && count($updatedUnitPrice)) {
         $unitPrice = $updatedUnitPrice[0];
     }
     return $unitPrice;
 }
 function getUnitPrice($recalculate = false)
 {
     $unitprice = 0;
     if ($this->priceHasBeenFixed() && !$recalculate) {
         return parent::getUnitPrice($recalculate);
     } elseif ($productVariation = $this->ProductVariation()) {
         $unitprice = $productVariation->getCalculatedPrice();
         $this->extend('updateUnitPrice', $unitprice);
     }
     return $unitprice;
 }