// MERGE product_multistore branch : product fields are now editable per shop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14682 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-04-17 13:32:12 +00:00
parent d4d1c35cb9
commit 0c2dd0cd2f
134 changed files with 3185 additions and 1789 deletions
+3 -3
View File
@@ -348,7 +348,7 @@ class HelperCore
public static function renderShopList()
{
if (!Shop::isFeatureActive())
if (!Shop::isFeatureActive() || count(Shop::getShops(false, null, true)) < 2)
return null;
$tree = Shop::getTree();
@@ -358,7 +358,7 @@ class HelperCore
if (Shop::getContext() == Shop::CONTEXT_ALL)
$value = '';
else if (Shop::getContext() == Shop::CONTEXT_GROUP)
$value = 'g-'.Shop::getContextGroupShopID();
$value = 'g-'.Shop::getContextShopGroupID();
else
$value = 's-'.Shop::getContextShopID();
@@ -369,7 +369,7 @@ class HelperCore
$html .= '<option value="" class="first">'.translate('All shops').'</option>';
foreach ($tree as $gID => $group_data)
{
if (!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_GROUP)
if ((!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_GROUP) && count($group_data['shops']) > 1)
$html .= '<option class="group" value="g-'.$gID.'" '.(($value == 'g-'.$gID) ? 'selected="selected"' : '').'>'.translate('Group:').' '.htmlspecialchars($group_data['name']).'</option>';
else
$html .= '<optgroup class="group" label="'.translate('Group:').' '.htmlspecialchars($group_data['name']).'">';