Shop
Loading order review…
async function loadCheckoutReview() {
const cartData = await fetchWCCart();
const container = document.getElementById(‘checkout-review-container’);
let reviewHTML = `
Your Order
-
`;
-
${item.name} x ${item.quantity}
$${rowTotal.toFixed(2)}
cartData.items.forEach(item => {
const rowTotal = parseFloat(item.prices.row_subtotal) / 100;
reviewHTML += `
`;
});
const totalVal = parseFloat(cartData.totals.total) / 100;
reviewHTML += `
$${totalVal.toFixed(2)}
`;
container.innerHTML = reviewHTML;
}
document.addEventListener(‘DOMContentLoaded’, loadCheckoutReview);
“`
—
## 4. The Shop Page
WooCommerce dynamically populates the shop page, but since you imported the 20 products, you can customize the page by creating a normal page, pasting the Custom HTML below, and making it your shop layout:
“`html
Showing 13–20 of 20 results
Showing 1–12 of 20 results
