[-] BO: Fix #PSCFV-7851 - shop logo and name should depend of the order shop and from the context

This commit is contained in:
Rémi Gaillard
2013-02-18 15:43:37 +01:00
parent 96b86a79f3
commit dd6a93d6f2
2 changed files with 14 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ abstract class HTMLTemplateCore
*/
public function getHeader()
{
$shop_name = Configuration::get('PS_SHOP_NAME');
$shop_name = Configuration::get('PS_SHOP_NAME', null, null, (int)$this->order->id_shop);
$path_logo = $this->getLogo();
$width = 0;
@@ -73,10 +73,10 @@ abstract class HTMLTemplateCore
$this->smarty->assign(array(
'available_in_your_account' => $this->available_in_your_account,
'shop_address' => $shop_address,
'shop_fax' => Configuration::get('PS_SHOP_FAX'),
'shop_phone' => Configuration::get('PS_SHOP_PHONE'),
'shop_details' => Configuration::get('PS_SHOP_DETAILS'),
'free_text' => Configuration::get('PS_INVOICE_FREE_TEXT', (int)Context::getContext()->language->id)
'shop_fax' => Configuration::get('PS_SHOP_FAX', null, null, (int)$this->order->id_shop),
'shop_phone' => Configuration::get('PS_SHOP_PHONE', null, null, (int)$this->order->id_shop),
'shop_details' => Configuration::get('PS_SHOP_DETAILS', null, null, (int)$this->order->id_shop),
'free_text' => Configuration::get('PS_INVOICE_FREE_TEXT', (int)Context::getContext()->language->id, null, (int)$this->order->id_shop)
));
return $this->smarty->fetch($this->getTemplate('footer'));
@@ -109,10 +109,10 @@ abstract class HTMLTemplateCore
$physical_uri = Context::getContext()->shop->physical_uri.'img/';
if (Configuration::get('PS_LOGO_INVOICE') != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE')))
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE');
elseif (Configuration::get('PS_LOGO') != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO')))
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO');
if (Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop)))
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop);
elseif (Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop)))
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop);
return $logo;
}

View File

@@ -1260,6 +1260,11 @@ class AdminOrdersControllerCore extends AdminController
}
$this->toolbar_title = sprintf($this->l('Order #%1$d (%2$s) - %3$s %4$s'), $order->id, $order->reference, $customer->firstname, $customer->lastname);
if (Shop::isFeatureActive())
{
$shop = new Shop((int)$order->id_shop);
$this->toolbar_title .= ' - '.sprintf($this->l('Shop: %s'), $shop->name);
}
// gets warehouses to ship products, if and only if advanced stock management is activated
$warehouse_list = null;