discount option added to calculator

This commit is contained in:
Arvind Tiwari 2018-05-07 05:07:58 +05:30
commit f8dc2c6bbe
18 changed files with 554 additions and 476 deletions

View file

@ -150,3 +150,12 @@ footer .dcl-link-separator::before {
border-radius: 100%;
background: #777;
}
.mb-0 {
margin-bottom: 0;
}
.thin-hr {
margin-top: 10px;
margin-bottom: 10px;
}

View file

@ -180,9 +180,13 @@
if(typeof window.ssdUnitPrice === 'undefined'){
window.ssdUnitPrice = 0.6;
}
if(typeof window.discountAmount === 'undefined'){
window.discountAmount = 0;
}
var total = (cardPricing['cpu'].value * window.coresUnitPrice) +
(cardPricing['ram'].value * window.ramUnitPrice) +
(cardPricing['storage'].value * window.ssdUnitPrice);
(cardPricing['storage'].value * window.ssdUnitPrice) -
window.discountAmount;
total = parseFloat(total.toFixed(2));
$("#total").text(total);
}