Google的简单购物车 [英] Google's Simple Shopping Cart
问题描述
以下是我一直在寻找的简单购物车: http://code.google的.com / p / jscart /维基/实施例。感谢大家的帮助。所有的笔记让我重新思考和思考......嗯,我想知道有人在那里做过类似的事情吗? 解决方案
这是因为你的currentStateOpened。
如果您添加了第一个物品,它将被设置为false,因此第二个物品的总价将为0。
Here is the simple shopping cart I was looking for: http://code.google.com/p/jscart/wiki/Example. Thank you everyone for your help. All the notes led me to rethink and ponder ... hmm, I wonder if someone out there has already done something similar ...
It's because of your "currentStateOpened". If you addd your first Item it will be set to false and thus the second item will have as total price "0".
However, you probably should code the whole thing differently. I hope that is for training purposes to get started with JS and you don't plan on using that in real life :)
这篇关于Google的简单购物车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!