Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($cart_result = this->cart->contents()){
- $total_after_discount=0;
- foreach ($cart_result as $item){
- $price = $item['price'];
- @$discount = $item['discount'];
- @$harga_discount = ($price*$discount)/100;
- echo "Harga Per baris Item = ".$harga_discount."<br>\n";
- $total_after_discount+=$harga_discount;
- }
- echo "Harga Total setelah diskon ".$total_after_discount;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement