// Opti
This commit is contained in:
@@ -384,7 +384,7 @@ class HelperCore
|
|||||||
if (!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_SHOP)
|
if (!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_SHOP)
|
||||||
foreach ($group_data['shops'] as $sID => $shopData)
|
foreach ($group_data['shops'] as $sID => $shopData)
|
||||||
if ($shopData['active'])
|
if ($shopData['active'])
|
||||||
$html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID) ? 'selected="selected"' : '').'>» '.$shopData['name'].'</option>';
|
$html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID) ? 'selected="selected"' : '').'>» '.($context->controller->multishop_context_group == false ? htmlspecialchars($group_data['name']).' - ' : '').$shopData['name'].'</option>';
|
||||||
|
|
||||||
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))
|
||||||
$html .= '</optgroup>';
|
$html .= '</optgroup>';
|
||||||
|
|||||||
@@ -256,15 +256,7 @@ class HelperListCore extends Helper
|
|||||||
{
|
{
|
||||||
// item_id is the product id in a product image context, else it is the image id.
|
// item_id is the product id in a product image context, else it is the image id.
|
||||||
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
|
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
|
||||||
// If it's a product image
|
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType;
|
||||||
if (isset($tr['id_image']))
|
|
||||||
{
|
|
||||||
$image = new Image((int)$tr['id_image']);
|
|
||||||
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$image->getExistingImgPath().'.'.$this->imageType;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType;
|
|
||||||
|
|
||||||
$this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
$this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
||||||
}
|
}
|
||||||
else if (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
else if (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||||
|
|||||||
@@ -156,13 +156,14 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'orderby' => false
|
'orderby' => false
|
||||||
);
|
);
|
||||||
$this->fields_list['position'] = array(
|
if ((int)Tools::getValue('id_category'))
|
||||||
'title' => $this->l('Position'),
|
$this->fields_list['position'] = array(
|
||||||
'width' => 70,
|
'title' => $this->l('Position'),
|
||||||
'filter_key' => 'cp!position',
|
'width' => 70,
|
||||||
'align' => 'center',
|
'filter_key' => 'cp!position',
|
||||||
'position' => 'position'
|
'align' => 'center',
|
||||||
);
|
'position' => 'position'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// @since 1.5 : translations for tabs
|
// @since 1.5 : translations for tabs
|
||||||
@@ -2116,10 +2117,6 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->addRowAction('edit');
|
$this->addRowAction('edit');
|
||||||
$this->addRowAction('duplicate');
|
$this->addRowAction('duplicate');
|
||||||
$this->addRowAction('delete');
|
$this->addRowAction('delete');
|
||||||
|
|
||||||
if (!Tools::getValue('id_category'))
|
|
||||||
unset($this->fields_list['position']);
|
|
||||||
|
|
||||||
return parent::renderList();
|
return parent::renderList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user