[-] BO : FixBug Url rewrite preview when user have a different language from shop
This commit is contained in:
1 parent
b1a0e715a6
commit
9f2423c2c5
1 file changed
+4
-2
@@ -2610,6 +2610,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function getPreviewUrl(Product $product)
|
public function getPreviewUrl(Product $product)
|
||||||
{
|
{
|
||||||
|
$id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, Context::getContext()->shop->id);
|
||||||
|
|
||||||
if (!ShopUrl::getMainShopDomain())
|
if (!ShopUrl::getMainShopDomain())
|
||||||
return false;
|
return false;
|
||||||
$is_rewrite_active = (bool)Configuration::get('PS_REWRITING_SETTINGS');
|
$is_rewrite_active = (bool)Configuration::get('PS_REWRITING_SETTINGS');
|
||||||
@@ -2618,7 +2620,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->getFieldValue($product, 'link_rewrite', $this->context->language->id),
|
$this->getFieldValue($product, 'link_rewrite', $this->context->language->id),
|
||||||
Category::getLinkRewrite($product->id_category_default, $this->context->language->id),
|
Category::getLinkRewrite($product->id_category_default, $this->context->language->id),
|
||||||
null,
|
null,
|
||||||
null,
|
$id_lang,
|
||||||
Context::getContext()->shop->id,
|
Context::getContext()->shop->id,
|
||||||
0,
|
0,
|
||||||
$is_rewrite_active
|
$is_rewrite_active
|
||||||
@@ -2630,7 +2632,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->getFieldValue($product, 'link_rewrite', $this->default_form_language),
|
$this->getFieldValue($product, 'link_rewrite', $this->default_form_language),
|
||||||
Category::getLinkRewrite($this->getFieldValue($product, 'id_category_default'), $this->context->language->id),
|
Category::getLinkRewrite($this->getFieldValue($product, 'id_category_default'), $this->context->language->id),
|
||||||
null,
|
null,
|
||||||
null,
|
$id_lang,
|
||||||
Context::getContext()->shop->id,
|
Context::getContext()->shop->id,
|
||||||
0,
|
0,
|
||||||
$is_rewrite_active
|
$is_rewrite_active
|
||||||
|
|||||||
Reference in new issue
Block a user