`;
}
/**
* Updates the quantity of a specific item in the cart.
* @param {string} itemId – The ID of the cart item.
* @param {number} change – The amount to change the quantity by (+1 or -1).
*/
function updateCartItemQuantity(itemId, change) {
const itemIndex = cart.findIndex(item => item.id === itemId);
if (itemIndex > -1) {
cart[itemIndex].quantity += change;
if (cart[itemIndex].quantity item.id !== itemId);
saveCart();
renderCartPage();
showToast(‘Item Removed’, ‘The item was successfully removed from your cart.’, ‘bg-red-500’);
}
/**
* Simulates the PayPal checkout process by showing a modal.
* @param {string} total – The total amount due.
*/
function simulateCheckout(total) {
if (cart.length === 0) {
showToast(‘Cart is Empty’, ‘Please add cookies before checking out.’, ‘bg-yellow-500’);
return;
}
const checkoutModal = document.getElementById(‘checkout-modal’);
const modalTotal = document.getElementById(‘modal-total-amount’);
const modalItems = document.getElementById(‘modal-items-list’);
modalTotal.textContent = `$${total}`;
modalItems.innerHTML = cart.map(item => `
${item.quantity} x ${item.name}$${(item.price * item.quantity).toFixed(2)}
`).join(”);
checkoutModal.style.display = ‘flex’;
}
/**
* Finalizes the simulated payment and clears the cart.
*/
function finalizePayment() {
// Simulate API call to PayPal
setTimeout(() => {
cart = [];
saveCart();
closeModal();
showToast(‘Payment Successful!’, ‘Thank you for ordering your 313 What Up Dough Cookies!’, ‘bg-green-600’, 5000);
navigate(‘home’);
}, 1000);
}
/**
* Closes the currently active modal.
*/
function closeModal() {
document.getElementById(‘checkout-modal’).style.display = ‘none’;
}
/**
* Displays a temporary toast notification.
* @param {string} title – The title of the toast.
* @param {string} message – The message body.
* @param {string} bgColor – Tailwind background color class (default bg-violet-600).
* @param {number} duration – How long to display in ms (default 3000).
*/
function showToast(title, message, bgColor = ‘bg-violet-600’, duration = 3000) {
const toast = document.getElementById(‘toast-notification’);
if (!toast) return;
toast.innerHTML = `
The 313 story: From a single secret recipe to the Motor City’s favorite bite. Made with local love, baked with soul.
The 313 Difference
What Up Dough? It’s a Movement.
Our journey started in a small Detroit kitchen, fueled by a passion for the perfect chew and a desire to spread joy. ‘313 What Up Dough’ isn’t just a name; it’s a greeting, a question, and an invitation to taste the city’s spirit in every bite. We pride ourselves on using high-quality ingredients, from local butter to premium chocolate, ensuring every cookie is a masterpiece.
“The secret to the dough is simple: it’s love, high standards, and a little bit of Detroit grit.”
Don’t Miss Our Signature Chocolate Chip
It’s the recipe that started it all. If you only try one, make it this one.
Award Winning Taste
Ships Nationwide
Baked Fresh Daily
Meet The Baker: Jane Doe
A Heart Full of Dough and Detroit
Jane Doe, the founder and chief baker behind 313 What Up Dough Cookies, is a true Detroit native. Her passion for baking started as a child, learning family recipes passed down through generations. After a successful but unfulfilling career in finance, Jane returned to her roots, realizing that the simple act of creating and sharing a perfect cookie was her true calling.
Jane believes that a cookie is more than just a treat—it’s a medium for connection. She sources ingredients locally whenever possible and is committed to giving back to the community that raised her, often hosting baking classes for local youth and donating cookies to neighborhood events.
Jane’s Philosophy:
Quality over Quantity: Every batch is handmade and baked to order.
Community First: Supporting local suppliers and initiatives.
The Perfect Chew: Never cakey, always a perfect balance of crispy edge and soft center.
Our Dough Collection
Choose your flavor and your size. Baked fresh, shipped fast.
Your Dough Basket
Your cart is empty!
Time to grab some fresh 313 dough.
Items in Cart
Order Summary
Get In Touch
Find Us & Connect
Address: 313 Dough Ave, Detroit, MI 48201
Phone: (313) 555-DOUGH
Email: dough@whatupdough313.com
Follow The Dough
Send Us a Message
Simulated PayPal Checkout
Please confirm your order details and proceed with the simulated payment.