Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // VARIABLES I NEED
- $total_price = 0;
- $total_quantity = 0;
- $names = ""; <---- THIS IS WHAT I DON'T KNOW HOW TO DO
- // HOW I LOOP THROUGH THE CURRENT SHOPPING CART
- foreach($_SESSION['shopping_cart'] as $id => $product){
- $product_id = $product['product_id'];
- $total_quantity += $product['quantity'];
- $total_price += $products[$product_id]['price'] * $product['quantity'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement