// Warning is now displayed for shop without url

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10512 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-23 11:11:45 +00:00
parent 130cf8ed11
commit ddcdcd571d
2 changed files with 25 additions and 2 deletions
+14 -1
View File
@@ -82,7 +82,20 @@ class AdminShopControllerCore extends AdminController
);
parent::__construct();
}
public function initContent()
{
$id_shop = ($this->context->shop->getContextType() == Shop::CONTEXT_SHOP ? $this->context->shop->id : false);
$shops = Shop::getShopWithoutUrls($id_shop);
if (count($shops))
{
$shop_url_configuration = '';
foreach ($shops as $shop)
$shop_url_configuration .= sprintf($this->l('No url is configured for shop: %s'), '<b>'.$shop['name'].'</b>').' <a href="'.$this->context->link->getAdminLink('AdminShopUrl').'&addshop_url&id_shop='.$shop['id_shop'].'">'.$this->l('click here').'</a><br />';
$this->content .= '<div class="warn">'.$shop_url_configuration.'</div>';
}
parent::initContent();
}
public function initList()
{
$this->addRowAction('edit');