Exemplo n.º 1
0
 /**
  * Return URL to access category  according to module preferences
  *
  * @return string	URL
  */
 function getLink()
 {
     $url = '';
     if (myshop_utils::getModuleOption('urlrewriting') == 1) {
         // URL rewriting
         $url = MYSHOP_URL . 'category-' . $this->getVar('cat_cid') . myshop_utils::makeSeoUrl($this->getVar('cat_title')) . '.html';
     } else {
         $url = MYSHOP_URL . 'category.php?cat_cid=' . $this->getVar('cat_cid');
     }
     return $url;
 }
Exemplo n.º 2
0
 /**
  * Retourne l'url à utiliser pour accéder à la page d'un fabricant
  *
  * @return string
  */
 function getLink()
 {
     $url = '';
     if (myshop_utils::getModuleOption('urlrewriting') == 1) {
         // On utilise l'url rewriting
         $url = MYSHOP_URL . 'manufacturer-' . $this->getVar('manu_id') . myshop_utils::makeSeoUrl($this->getVar('manu_commercialname') . ' ' . $this->getVar('manu_name')) . '.html';
     } else {
         // Pas d'utilisation de l'url rewriting
         $url = MYSHOP_URL . 'manufacturer.php?manu_id=' . $this->getVar('manu_id');
     }
     return $url;
 }
Exemplo n.º 3
0
 /**
  * Return product link with or without URL Rewriting
  * @return string
  */
 function getLink($product_id = 0, $product_title = '')
 {
     $url = '';
     if ($product_id == 0 && $product_title == '') {
         $product_id = $this->getVar('product_id');
         $product_title = $this->getVar('product_title');
     }
     if (myshop_utils::getModuleOption('urlrewriting') == 1) {
         // URL rewriting
         $url = MYSHOP_URL . 'product-' . $product_id . myshop_utils::makeSeoUrl($product_title) . '.html';
     } else {
         // No URL rewriting
         $url = MYSHOP_URL . 'product.php?product_id=' . $product_id;
     }
     return $url;
 }