如何在 Prestashop 的订单管理页面管理员上显示产品代码数据我迷失在文件中。请帮助我提前致谢
问问题
706 次
1 回答
0
我找到了一个解决方案,我不知道它是否允许在这里回答你自己的问题,但我发布这个答案是希望它能帮助别人
我在 AdminOrdersController.php 上查询
完整链接是 >>> myshop/controllers/admin/AdminOrdersController.php
$this->_select = '
od.product_name AS products_zee, /* This is the main thing which I changed */
a.id_currency,
a.id_order AS id_pdf,
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
osl.`name` AS `osname`,
os.`color`,
IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order` = a.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
LEFT JOIN `'._DB_PREFIX_.'address` addr ON (a.`id_address_delivery` = addr.`id_address`)
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$this->context->language->id.')';
$this->_orderBy = 'id_order';
$this->_orderWay = 'DESC';
之后我在这段代码之后添加数组
'reference' => array(
'title' => $this->l('Reference'),
'align' => 'center',
'width' => 65
),
'products_zee' => array(
'title' => $this->l('Products'),
'align' => 'center',
'width' => 85
),
于 2013-11-04T15:49:42.397 回答