// Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17119 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
82bc3f0916
commit
875d98bca5
1 file changed
+8
-5
@@ -36,15 +36,12 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
$this->addRowAction('view');
|
$this->addRowAction('view');
|
||||||
$this->addRowAction('delete');
|
$this->addRowAction('delete');
|
||||||
|
|
||||||
$this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total, ca.name carrier, o.id_order, IF(co.id_guest, 1, 0) id_guest, (
|
$this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total, ca.name carrier, o.id_order, IF(co.id_guest, 1, 0) id_guest';
|
||||||
SELECT SUM(quantity) FROM '._DB_PREFIX_.'cart_product cp WHERE cp.id_cart = a.id_cart
|
|
||||||
) as total_quantity';
|
|
||||||
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer)
|
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer)
|
||||||
LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency)
|
LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency)
|
||||||
LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.id_carrier = a.id_carrier)
|
LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.id_carrier = a.id_carrier)
|
||||||
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart)
|
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart)
|
||||||
LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(NOW(), co.`date_add`)) < 1800)';
|
LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(NOW(), co.`date_add`)) < 1800)';
|
||||||
$this->_having = 'total_quantity > 0';
|
|
||||||
|
|
||||||
$this->fields_list = array(
|
$this->fields_list = array(
|
||||||
'id_cart' => array(
|
'id_cart' => array(
|
||||||
@@ -245,6 +242,9 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if ($this->tabAccess['edit'] === '1')
|
if ($this->tabAccess['edit'] === '1')
|
||||||
|
{
|
||||||
|
$errors = array();
|
||||||
|
if (Tools::getValue('only_display') != 1)
|
||||||
{
|
{
|
||||||
if (!$this->context->cart->id || (!$id_product = (int)Tools::getValue('id_product')))
|
if (!$this->context->cart->id || (!$id_product = (int)Tools::getValue('id_product')))
|
||||||
return;
|
return;
|
||||||
@@ -290,9 +290,11 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
unlink($tmp_name);
|
unlink($tmp_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->setMedia();
|
$this->setMedia();
|
||||||
$this->initFooter();
|
$this->initFooter();
|
||||||
$this->context->smarty->assign('customization_errors', implode('<br />', $errors));
|
$this->context->smarty->assign(array('customization_errors' => implode('<br />', $errors),
|
||||||
|
'css_files' => $this->css_files));
|
||||||
return $this->context->smarty->display('controllers/orders/form_customization_feedback.tpl');
|
return $this->context->smarty->display('controllers/orders/form_customization_feedback.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -573,6 +575,7 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
$product['attributes_small'] = '';
|
$product['attributes_small'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $summary;
|
return $summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user