fixed bug with more than 10 items in cart

This commit is contained in:
Senad Uka
2015-06-14 03:38:44 +02:00
parent e5cc98f934
commit 032dfc6d64

View File

@@ -130,7 +130,15 @@ var addNItems = function(item, count) {
_itemsForDisplay.add(item);
state.set('count', state.get('count') + count);
var realCount = state.get('count') + count;
// remove if we choose to support more than
// 10 items of single type in cart
if (realCount > 10) {
realCount = 10;
}
state.set('count', realCount);
states[itemId] = state;
saveCartStateForItem(itemId);