/** * @return int */ public function getDiscountedProductID() { $productKey = OrderItem::config()->buyable_relationship . "ID"; return $this->owner->{$productKey}; }