public static function getByPath($productPath) { $product = new Product(); $productPage = ProductPage::getByPath($productPath); if (!$productPage->isError()) { $product->loadRequiredFields($productPage); return $product; } return false; }
protected function install_extensions() { $ext = new Extension(); // product types $productType = new Product(); $productType->installDefaultTypes(); // payment methods $payment = new Payment(); $payment->installDefaultMethods(); // shipping methods $shipping = new Shipping(); $shipping->installDefaultMethods(); }