/** * Get front URL * * @return string */ public function getFrontURL() { $result = null; if ($this->getId()) { $result = \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('page', '', array('id' => $this->getId()), 'cart.php', true))); } return $result; }
/** * Compose URL from target, action and additional params * * @param string $target Page identifier OPTIONAL * @param string $action Action to perform OPTIONAL * @param array $params Additional params OPTIONAL * @param boolean $forceCuFlag Force flag - use Clean URL OPTIONAL * * @return string */ public function buildURL($target = '', $action = '', array $params = array(), $forceCuFlag = null) { return \XLite\Core\Converter::makeURLValid(\XLite\Core\Handler::buildURL($target, $action, $params, $forceCuFlag)); }
/** * Preprocess Open Graph meta tags * * @param string $tags Tags content * * @return string */ protected function preprocessOpenGraphMetaTags($tags) { $categoryURL = $this->getParent() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('category', '', array('category_id' => $this->getCategoryId()), \XLite::getCustomerScript()))) : \XLite::getInstance()->getShopURL(); return str_replace(array('[PAGE_URL]', '[IMAGE_URL]'), array($categoryURL, $this->getImage() ? $this->getImage()->getFrontURL() : ''), $tags); }
/** * Get front URL * * @return string */ public function getFrontURL() { return $this->getProductId() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('product', '', array('product_id' => $this->getProductId()), \XLite::CART_SELF))) : null; }
/** * Get URL * * @return string */ public function getURL() { $url = null; if ($this->isURL()) { $url = $this->getPath(); } elseif (static::STORAGE_RELATIVE == $this->getStorageType()) { $url = \XLite::getInstance()->getShopURL($this->getWebRoot() . $this->convertPathToURL($this->getPath()), \XLite\Core\Request::getInstance()->isHTTPS()); } else { $root = $this->getFileSystemRoot(); if (0 === strncmp($root, $this->getPath(), strlen($root))) { $path = substr($this->getPath(), strlen($root)); $url = \XLite::getInstance()->getShopURL($this->getWebRoot() . $this->convertPathToURL($path), \XLite\Core\Request::getInstance()->isHTTPS()); } else { $url = $this->getGetterURL(); } } return \XLite\Core\Converter::makeURLValid($url); }
/** * Get front URL * * @return string */ public function getFrontURL() { $url = null; if ($this->getId()) { $url = \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('newsMessage', '', array('id' => $this->getId()), \XLite::CART_SELF, true))); } return $url; }