Seperate discounts for ship and components, added discounts for 5,10,15,20,25 percent off

This commit is contained in:
Colin McLeod
2015-06-25 20:26:22 -07:00
parent 9009a2a434
commit 10d5611dcd
11 changed files with 128 additions and 31 deletions

View File

@@ -189,7 +189,7 @@ angular.module('app').service('Persist', ['$window', 'lodash', function($window,
*/
this.setDiscount = function(val) {
if (this.lsEnabled) {
return localStorage.setItem('discount', val);
return localStorage.setItem('discounts', angular.toJson(val));
}
};
@@ -199,7 +199,7 @@ angular.module('app').service('Persist', ['$window', 'lodash', function($window,
*/
this.getDiscount = function() {
if (this.lsEnabled) {
return localStorage.getItem('discount');
return angular.fromJson(localStorage.getItem('discounts'));
}
return null;
};