[英]Opencart Modification
I am currently using OpenCart 1.5. 我目前正在使用OpenCart 1.5。 I need to display the product purchased in the orders page inside the admin: sales/order. 我需要在管理员内部的订单页面中显示购买的产品:销售/订单。 along with the Order_id, customer, status, total, etc... 以及Order_id,客户,状态,总数等...
Should I be able to do this with a module? 我应该能够使用模块执行此操作吗? or can I modify the model (order.php) with another database query. 或者我可以使用另一个数据库查询来修改模型(order.php)。 Currently it is called getOrders($data = array()) but it only queries the .order_status database so therefore I can't return the product's name as part of the foreach results in the controller nor the view. 当前它称为getOrders($ data = array()),但它仅查询.order_status数据库,因此,我无法在控制器或视图中将产品名称作为foreach结果的一部分返回。 Although line 562 in the same model looks pretty familiar to what I want but it is only used after an action is clicked on by the user. 尽管同一模型中的562行看起来很熟悉我想要的内容,但是仅在用户单击动作后才使用。 Any help? 有什么帮助吗?
You have two choices: 您有两种选择:
Anyway, a module won't do that (unless You think of vQmod edits as a module). 无论如何,模块不会那样做(除非您将vQmod编辑视为模块)。 You would need to edit the controller - getList()
method and the model - getOrders()
method. 您将需要编辑控制器getList()
方法和模型getList()
getOrders()
方法。 Think wisely how much information You want to display, as products may have other options and You may end up in a juggernaut query and only the list of 20 orders may take few seconds to complete... 明智地考虑您要显示多少信息,因为产品可能还有其他选择,并且您可能会遇到麻烦的查询,只有20个订单的清单可能需要几秒钟才能完成...
Good luck. 祝好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.