Add checkout.js

This commit is contained in:
Moe Poi ~ 2021-11-20 09:09:47 +07:00
parent 4e7f5767d7
commit 2f0c7f069a

View file

@ -1,3 +1,7 @@
function proceedCheckout() {
localStorage.removeItem("bag");
}
function view_checkout() {
var bag = JSON.parse(localStorage.getItem("bag"));
var html = '';
@ -35,6 +39,7 @@ function view_checkout() {
</tr>
`
document.getElementById("view-checkout").innerHTML = html;
document.getElementById("data").value = JSON.stringify(bag);
}
view_checkout();