Google's Simple Shopping Cart [closed]

两盒软妹~` 提交于 2019-12-13 10:11:06

问题


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 ...


回答1:


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 :)



来源:https://stackoverflow.com/questions/28398772/googles-simple-shopping-cart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!