Chinaunix首页 | 论坛 | 博客
  • 博客访问: 114820
  • 博文数量: 49
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 609
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-23 10:48
文章分类
文章存档

2015年(4)

2014年(27)

2013年(18)

我的朋友

分类: Web开发

2015-01-18 20:24:53

OpenCart 1.5.x以及2.x版本中,在后台编辑商品时,有设定是否减少库存(subtract)选项,如果选中了,则在后续订单中处理时会减少库存数量。

库存数量减少的机制因opencart版本不同而不同。

在OpenCart 2.x系列版本中,库存数量的减少是通过如下路径的model文件处理的。
catalog/model/checkout/order.php

// If current order status is not processing or complete but new status is processing or complete then commence completing the order

//如果当前订单状态不是【处理中】或【已完成】状态,但要更换为的状态为【处理中】或【已完成】状态,则减少库存

该操作的触发事件是网站后台更改订单状态为【Processing(处理中)】或【Complete(已完成)】。

阅读(917) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~