From 02fac949bfc362586fbf4a51e2de209ea46ebe5b Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Thu, 26 Jul 2012 08:29:44 +0000 Subject: [PATCH] [-] BO : #PSCFV-3213 - Fix bug with FO product url on the BO git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16577 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Link.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/classes/Link.php b/classes/Link.php index 12a1da48b..fdc52948e 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -83,15 +83,16 @@ class LinkCore public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false) { $dispatcher = Dispatcher::getInstance(); - $url = _PS_BASE_URL_.__PS_BASE_URI__; if (!$id_lang) $id_lang = Context::getContext()->language->id; - // @todo use specific method ? - if ($id_shop && ($shop = Shop::getShop($id_shop))) - $url = 'http://'.$shop['domain'].$shop['uri']; - $url .= $this->getLangLink($id_lang); + if (!$id_shop) + $shop = Context::getContext()->shop; + else + $shop = new Shop($id_shop); + + $url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang); if (!is_object($product)) {