[+] Add a route system to personalize rewrited URL

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7876 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-03 16:02:49 +00:00
parent 3e298ba94f
commit 6f08bcb12e
7 changed files with 343 additions and 187 deletions
+7
View File
@@ -184,6 +184,8 @@ class ProductCore extends ObjectModel
/*** @var array Tags */
public $tags;
public $isFullyLoaded = false;
protected $langMultiShop = true;
@@ -300,6 +302,7 @@ class ProductCore extends ObjectModel
if ($full AND $this->id)
{
$this->isFullyLoaded = $full;
$this->tax_name = 'deprecated'; // The applicable tax may be BOTH the product one AND the state one (moreover this variable is some deadcode)
$this->manufacturer_name = Manufacturer::getNameById((int)$this->id_manufacturer);
$this->supplier_name = Supplier::getNameById((int)$this->id_supplier);
@@ -2691,8 +2694,12 @@ class ProductCore extends ObjectModel
public function getTags($id_lang)
{
if (!$this->isFullyLoaded && is_null($this->tags))
$this->tags = Tag::getProductTags($this->id);
if (!($this->tags AND key_exists($id_lang, $this->tags)))
return '';
$result = '';
foreach ($this->tags[$id_lang] AS $tagName)
$result .= $tagName.', ';