コード例 #1
0
ファイル: Category.php プロジェクト: haegyung/xe-module-shop
 /**
  * Returns the URL to this category
  * for the frontend product browsing (filtered by category)
  *
  * TODO Remove this function and use the CategoryTreeNode features instead
  * because custom urls are already supported
  *
  * @param bool $relative
  * @return string
  */
 public function getUrl($relative = TRUE)
 {
     if (!$this->friendly_url) {
         return getUrl('', 'act', 'dispShop', 'vid', BaseRepository::vid(), 'category_srl', $this->category_srl);
     }
     $repo = $this->repo;
     return $repo::getUrl($this->friendly_url, $relative);
 }
コード例 #2
0
ファイル: ShopUtils.php プロジェクト: haegyung/xe-module-shop
 public static function getUrl($pattern = null, $relative = true)
 {
     return ($relative ? '' : getFullSiteUrl()) . Context::pathToUrl(_XE_PATH_) . BaseRepository::vid() . '/' . $pattern;
 }
コード例 #3
0
ファイル: Product.php プロジェクト: haegyung/xe-module-shop
 /**
  * get product url
  * @param bool $relative
  * @return string
  */
 public function getUrl($relative = true)
 {
     if (!$this->friendly_url) {
         return getUrl('', 'act', 'dispShopProduct', 'vid', BaseRepository::vid(), 'product_srl', $this->product_srl);
     }
     $repo = $this->repo;
     return $repo::getUrl($this->friendly_url, $relative);
 }