2013-11-03 18:57
浏览 40


How to show product code data on Order Management Page admin in Prestashop I am lost in files. Please help me Thanks in Advance

图片转代码服务由CSDN问答提供 功能建议

如何在Prestashop中的订单管理页面管理员上显示产品代码数据 我在文件中丢失了。 请帮助我 谢谢提前

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douyan8961 2013-11-04 15:49

    I found a solution, I don't know its allow or not to answer your own question here but I post this answer with this hope that it will help someone

    I chage the query on AdminOrdersController.php

    Full Link is >>> myshop/controllers/admin/AdminOrdersController.php

    $this->_select = '
            od.product_name AS products_zee,         /* This is the main thing which I changed */
            a.id_order AS id_pdf,
            CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
            osl.`name` AS `osname`,
            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';

    After that I add array after this code

    'reference' => array(
                'title' => $this->l('Reference'),
                'align' => 'center',
                'width' => 65
    'products_zee' => array(
        'title' => $this->l('Products'),
        'align' => 'center',
        'width' => 85
    打赏 评论

相关推荐 更多相似问题