Skip to content

Commit

Permalink
Merge pull request #832 from techy4shri/feature
Browse files Browse the repository at this point in the history
fix: Total amount remains same irrespective of the package selected #781
  • Loading branch information
apu52 authored Jun 26, 2024
2 parents 5be7a40 + 671bdd3 commit c24ea33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function validateAddress() {
const promoCodeDiscount = 1000;
const totalCost = packageCost - promoCodeDiscount;
document.getElementById("total-cost").textContent = totalCost + "/-";

/*Free And express Delivary Code starts here*/

document.addEventListener("DOMContentLoaded", function () {
Expand Down Expand Up @@ -210,7 +210,7 @@ document.addEventListener("DOMContentLoaded", function () {
listGroup.insertBefore(shippingItem, totalSpan.parentNode);

// To Update the total amount in the cart
const totalAmount = 14000 + shippingCost; //imagine total amount is 14000 INR
const totalAmount = totalCost + shippingCost; //imagine total amount is 14000 INR
totalSpan.textContent = `${totalAmount} INR`;
}

Expand Down

0 comments on commit c24ea33

Please sign in to comment.