[*] FO : combination link from product page are now the same as the combination link from blocklayered

// Cart is now accepting the combination link
This commit is contained in:
vChabot
2011-11-10 10:45:19 +00:00
parent 4846333250
commit 95cde12b84
10 changed files with 261 additions and 45 deletions
+8 -2
View File
@@ -68,9 +68,10 @@ class LinkCore
* @param string $ean13
* @param int $id_lang
* @param int $id_shop (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart
* @param int $ipa ID product attribute
* @return string
*/
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null)
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0)
{
$dispatcher = Dispatcher::getInstance();
$url = _PS_BASE_URL_.__PS_BASE_URI__;
@@ -107,7 +108,12 @@ class LinkCore
if ($dispatcher->hasKeyword('product_rule', 'tags'))
$params['tags'] = Tools::str2url($product->getTags($id_lang));
return $url.$dispatcher->createUrl('product_rule', $params, $this->allow);
if ($ipa)
$anchor = $product->getAnchor($ipa);
else
$anchor = '';
return $url.$dispatcher->createUrl('product_rule', $params, $this->allow, $anchor);
}
/**