diff --git a/checkout.html b/checkout.html index e34c321..a8dfb3e 100644 --- a/checkout.html +++ b/checkout.html @@ -20,7 +20,7 @@

Checkout

-
+

@@ -36,7 +36,10 @@

+
+ TIP: EMAD is a secret promo code. +

@@ -188,7 +191,7 @@

Payment


- +
diff --git a/script.js b/script.js index 4b2c9ad..3c6c9a7 100644 --- a/script.js +++ b/script.js @@ -392,7 +392,7 @@ const updateCheckout = () => { ? `
  • -
    Promo code
    +
    Promo code (-20%)
    EMAD
    −$${discount} @@ -408,6 +408,20 @@ const updateCheckout = () => {
  • `; }; +processOrder = () => { + let orderNumber = Math.floor(Math.random() * 100000); + const container = document.getElementById("container"); + container.innerHTML = `

    Order number: ${orderNumber}

    `; + scroll(0,0); + Swal.fire( + 'Order has been submited successfuly!', + `Your order number is ${orderNumber}`, + 'success' + ) + +} + window.onload = () => { updateCheckout(); }; +