How would i display this on a new page

Iam doing an project for college and first time working with add to cart so found this example on google it works but would like the cart to display on a new page

From my understanding this is the the part where it gets printed


 var cartRowContents = `
        <div class="cart-item cart-column">
            <img class="cart-item-image" src="${imageSrc}" width="100" height="100">
            <span class="cart-item-title">${title}</span>
        <span class="cart-price cart-column">${price}</span>
        <div class="cart-quantity cart-column">
            <input class="cart-quantity-input" type="number" value="1">
            <button class="btn btn-danger" type="button">REMOVE</button>
    cartRow.innerHTML = cartRowContents
    cartRow.getElementsByClassName('btn-danger')[0].addEventListener('click', removeCartItem)
    cartRow.getElementsByClassName('cart-quantity-input')[0].addEventListener('change', quantityChanged)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.