fixed bugs with cart notification number
This commit is contained in:
@@ -74,7 +74,17 @@ var CartStore = _.extend({}, EventEmitter.prototype, {
|
||||
|
||||
getWholeCartState: function() {
|
||||
|
||||
var numberOfItems = _itemsInCart.models.filter(function(item) { return item.get('count') > 0 }).length;
|
||||
var numberOfItems = 0;
|
||||
|
||||
for (key in states) {
|
||||
if(states.hasOwnProperty(key)){
|
||||
var value = states[key];
|
||||
if (value.get('count') > 0) {
|
||||
numberOfItems++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var state = {
|
||||
count: numberOfItems
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user