fixed bug with more than 10 items in cart
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user