数据库建模:运输规则
我正在开发一个电子商务类型的网络应用程序,需要以某种方式处理运输成本的计算。我发现的一些规则:
- 免费送货
- 最低购买量
- 免费送货 特定地理区域内免费送货
- 统一费率运输
- 统一费率 + 每个产品的设定金额
- 各种费率取决于运输速度(立即发货和/或多久到达客户手中) )
- 基于高度、宽度、深度、重量 + 运输距离
- 基于各个托运人的费率
...等等。
有什么建议如何解决这样的问题吗?
I'm working on an e-commerce type web application and need to somehow handle calculation of shipping costs. Some rules I've found:
- Free shipping
- Free shipping with minimum purchase
- Free shipping within a certain geographic area
- Flat rate shipping
- Flat rate + set amount per product
- Various rates depending on speed of shipping (shipped immediately and/or how soon it gets to customer)
- Based on height, width, depth, weight + shipping distance
- Based on rates of various shippers
... and so on.
Any suggestions how to tackle such a problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议您查看一些可用的开源电子商务解决方案。它们有很多,每一个都在努力做你想做的事情。如果您追求的是模式设计,我不会将您的搜索仅限于 MySQL - 只要它包含关系数据库,就应该很容易深入研究设计。我会看一下 nopcommerce 仅举一个例子......
I suggest you take a look at some available open source ecommerce solutions. There are a LOT of them and each one takes a stab at doing exactly what you are trying to do. If it is schema design you are after I wouldn't limit your searches to just MySQL - as long as it contains a relational database it should be easy to dig into the design. I'd take a look at nopcommerce to name just one...
创建一个框架,您的电子商务系统接受定义运输规则(以及接口和计算等)的模块。设计它时,您希望这些模块能够提供所有这些功能。让最终用户根据自己的需求决定使用哪些模块,因为使用哪些运输规则是业务决策而不是技术决策。
Create a framework where your eCommerce system accepts modules that define shipping rules (and interfaces and calculations, etc). Design it such that you expect these modules to be able to provide all those functions. Let the end users decide which modules to use based on their own needs, as which shipping rules to use is a business decision and not a technology one.