// Add actions to product list and fix product duplication
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10560 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -23,5 +23,5 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a class="pointer" href="{$href}" onclick="if (confirm('{$confirm}')) document.location = '{$location_ok}'; else document.location = '{$location_ko}';">
|
||||
<a class="pointer" onclick="if (confirm('{$confirm}')) document.location = '{$location_ok}'; else document.location = '{$location_ko}';">
|
||||
<img src="../img/admin/duplicate.png" alt="{$action}" title="{$action}" /></a>
|
||||
@@ -361,7 +361,7 @@ class HelperListCore extends Helper
|
||||
'action' => self::$cache_lang['Duplicate'],
|
||||
'confirm' => self::$cache_lang['Copy images too?'],
|
||||
'location_ok' => $duplicate.'&token='.($token != null ? $token : $this->token),
|
||||
'location_ko' => $duplicate.'&noimage=1&token='.($token ? $token : $this->token).'\\',
|
||||
'location_ko' => $duplicate.'&noimage=1&token='.($token ? $token : $this->token),
|
||||
));
|
||||
|
||||
return $tpl->fetch();
|
||||
@@ -564,13 +564,13 @@ class HelperListCore extends Helper
|
||||
'show_toolbar' => $this->show_toolbar,
|
||||
'toolbar_fix' => $this->toolbar_fix,
|
||||
'toolbar_btn' => $this->toolbar_btn,
|
||||
|
||||
|
||||
'ps_help_context' => $this->ps_help_context,
|
||||
'class_name' => get_class($this->context->controller),
|
||||
'iso_user' => $this->context->language->id,
|
||||
'country_iso_code' => $this->context->country->iso_code,
|
||||
'version' => _PS_VERSION_,
|
||||
|
||||
|
||||
'table' => $this->table,
|
||||
'currentIndex' => $this->currentIndex,
|
||||
'action' => $action,
|
||||
|
||||
@@ -2919,6 +2919,9 @@ class ProductCore extends ObjectModel
|
||||
|
||||
public static function duplicateCustomizationFields($oldProductId, $productId)
|
||||
{
|
||||
// If customization is not activated, return success
|
||||
if (!Customization::isFeatureActive())
|
||||
return true;
|
||||
if (($customizations = self::_getCustomizationFieldsNLabels($oldProductId)) === false)
|
||||
return false;
|
||||
if (empty($customizations))
|
||||
|
||||
@@ -70,10 +70,11 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->table = 'product';
|
||||
$this->className = 'Product';
|
||||
$this->lang = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = false;
|
||||
$this->duplicate = true;
|
||||
$this->addRowAction('edit');
|
||||
$this->addRowAction('duplicate');
|
||||
$this->addRowAction('delete');
|
||||
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
|
||||
|
||||
$this->imageType = 'jpg';
|
||||
$this->context = Context::getContext();
|
||||
$this->_defaultOrderBy = 'position';
|
||||
|
||||
Reference in New Issue
Block a user