From 3efef4dafb204d8cc40c662e530f83bc90ac7d14 Mon Sep 17 00:00:00 2001 From: Thibaud Chauviere Date: Wed, 10 Sep 2014 11:55:43 +0200 Subject: [PATCH] [*] MO : blocktopmenu - better multishop details display --- blocktopmenu.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/blocktopmenu.php b/blocktopmenu.php index 8177186..c2b6df0 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -309,8 +309,17 @@ class Blocktopmenu extends Module private function getCurrentShopInfoMsg() { + $shop_info = null; + + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $shop_info = $this->l(sprintf('The modifications will be applied to shop: %s', $this->context->shop->name)); + else if (Shop::getContext() == Shop::CONTEXT_GROUP) + $shop_info = $this->l(sprintf('The modifications will be applied to this group: %s', Shop::getContextShopGroup()->name)); + else + $shop_info = $this->l('The modifications will be applied to all shops'); + return '
'. - $this->l('The modifications will be applied to').' '.(Shop::getContext() == Shop::CONTEXT_SHOP ? $this->l('shop').' '.$this->context->shop->name : $this->l('all shops')). + $shop_info. '
'; }