/** * Returns the default image or a dummy one if it does not exists. * @return String */ function DefaultImage() { if ($this->DefaultProductImageID) { if ($defaultImage = $this->DefaultProductImage()) { if ($defaultImage->exists()) { return $defaultImage; } } } $obj = Product_Image::create(); $obj->Link = $this->DefaultImageLink(); $obj->URL = $this->DefaultImageLink(); return $obj; }