// Improve backoffice order
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
<div class="second-select margin-form format_{$k}" style="display:none;">
|
<div class="second-select margin-form format_{$k}" style="display:none;">
|
||||||
<select class="second-select format_{$k}" name="format_{$k}">
|
<select class="second-select format_{$k}" name="format_{$k}">
|
||||||
<option value="all">{l s='All'}</option>';
|
<option value="all">{l s='All'}</option>';
|
||||||
{foreach $formats AS $format}
|
{foreach $formats[$k] AS $format}
|
||||||
<option value="{$format['id_image_type']}">{$format['name']}</option>
|
<option value="{$format['id_image_type']}">{$format['name']}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -909,7 +909,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<label>{l s='Search a voucher:'} </label>
|
<label>{l s='Search a voucher:'} </label>
|
||||||
<input type="text" id="voucher" value="" />
|
<input type="text" id="voucher" value="" />
|
||||||
<a class="fancybox button" href="{$link->getAdminLink('AdminDiscounts')}&adddiscount&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new voucher'}</a>
|
<a class="fancybox button" href="{$link->getAdminLink('AdminCartRules')}&addcart_rule&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new voucher'}</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<table cellspacing="0" cellpadding="0" class="table" id="voucher_list">
|
<table cellspacing="0" cellpadding="0" class="table" id="voucher_list">
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ class AdminControllerCore extends Controller
|
|||||||
/** @var array list of row ids associated with a given action for witch this action have to not be available */
|
/** @var array list of row ids associated with a given action for witch this action have to not be available */
|
||||||
protected $list_skip_actions = array();
|
protected $list_skip_actions = array();
|
||||||
|
|
||||||
|
/* @var boolean don't show header & footer */
|
||||||
|
protected $lite_display = false;
|
||||||
/** @var bool boolean List content lines are clickable if true */
|
/** @var bool boolean List content lines are clickable if true */
|
||||||
protected $list_no_link = false;
|
protected $list_no_link = false;
|
||||||
|
|
||||||
@@ -968,11 +970,11 @@ class AdminControllerCore extends Controller
|
|||||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||||
if (empty($back))
|
if (empty($back))
|
||||||
$back = self::$currentIndex.'&token='.$this->token;
|
$back = self::$currentIndex.'&token='.$this->token;
|
||||||
|
if (!$this->lite_display)
|
||||||
$this->toolbar_btn['back'] = array(
|
$this->toolbar_btn['back'] = array(
|
||||||
'href' => $back,
|
'href' => $back,
|
||||||
'desc' => $this->l('Back to list')
|
'desc' => $this->l('Back to list')
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'options':
|
case 'options':
|
||||||
$this->toolbar_btn['save'] = array(
|
$this->toolbar_btn['save'] = array(
|
||||||
@@ -1696,6 +1698,7 @@ class AdminControllerCore extends Controller
|
|||||||
$this->display_header = false;
|
$this->display_header = false;
|
||||||
$this->display_footer = false;
|
$this->display_footer = false;
|
||||||
$this->content_only = false;
|
$this->content_only = false;
|
||||||
|
$this->lite_display = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change shop context ?
|
// Change shop context ?
|
||||||
|
|||||||
@@ -120,14 +120,13 @@ class ShopCore extends ObjectModel
|
|||||||
public function __construct($id = null, $id_lang = null, $id_shop = null)
|
public function __construct($id = null, $id_lang = null, $id_shop = null)
|
||||||
{
|
{
|
||||||
parent::__construct($id, $id_lang, $id_shop);
|
parent::__construct($id, $id_lang, $id_shop);
|
||||||
|
|
||||||
if ($this->id)
|
if ($this->id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.name, t.directory
|
$sql = 'SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.name, t.directory
|
||||||
FROM '._DB_PREFIX_.'shop s
|
FROM '._DB_PREFIX_.'shop s
|
||||||
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
||||||
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
||||||
WHERE s.id_shop = '.$this->id.'
|
WHERE s.id_shop = '.(int)$this->id.'
|
||||||
AND s.active = 1
|
AND s.active = 1
|
||||||
AND s.deleted = 0
|
AND s.deleted = 0
|
||||||
AND su.main = 1';
|
AND su.main = 1';
|
||||||
@@ -226,6 +225,7 @@ class ShopCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function initialize()
|
public static function initialize()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get list of excluded uri
|
// Get list of excluded uri
|
||||||
$dirname = dirname(__FILE__);
|
$dirname = dirname(__FILE__);
|
||||||
$directories = scandir($dirname.'/../');
|
$directories = scandir($dirname.'/../');
|
||||||
|
|||||||
@@ -134,10 +134,12 @@ class AdminAddressesControllerCore extends AdminController
|
|||||||
'class' => 'button'
|
'class' => 'button'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$id_customer = (int)Tools::getValue('id_customer');
|
||||||
if (Validate::isLoadedObject($this->object))
|
if (!$id_customer && Validate::isLoadedObject($this->object))
|
||||||
|
$id_customer = $this->object->id_customer;
|
||||||
|
if ($id_customer)
|
||||||
{
|
{
|
||||||
$customer = new Customer($this->object->id_customer);
|
$customer = new Customer((int)$id_customer);
|
||||||
$tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id);
|
$tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,6 +274,12 @@ class AdminAddressesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Tools::isSubmit('submit'.strtoupper($this->table)) && Validate::isLoadedObject($customer) && !Validate::isLoadedObject($this->object))
|
||||||
|
{
|
||||||
|
$this->fields_value['lastname'] = $customer->lastname;
|
||||||
|
$this->fields_value['firstname'] = $customer->firstname;
|
||||||
|
}
|
||||||
|
|
||||||
// merge address format with the rest of the form
|
// merge address format with the rest of the form
|
||||||
array_splice($this->fields_form['input'], 3, 0, $temp_fields);
|
array_splice($this->fields_form['input'], 3, 0, $temp_fields);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user