By "preview mode", I meant to refer to a mode of the Web design software itself, where you can use that app to see (sometimes roughly) how the page would look without loading it in an actual browser like Firefox. Your design software may not even have that mode available, but the ones that do are all over the map in terms of how faithfully their preview mode works like any actual browser, so it's really not ideal for testing/troubleshooting.
The cart may appear to "work" fine from a local copy, as long as you have an active Internet connection, you'll probably find that the cart can only hold one item at a time immediately after it's added, but that item will be gone when you View Cart or add another item to the cart.
At any rate, the conditions I described (live page, real browser, live Internet connection) are those in which the cart has been developed and tested to work. We can't vouch that our cart would work properly or even at all outside of those conditions, so we don't recommend testing your cart or troubleshooting any issues unless you're doing so within the expected environment. :^)