Login
Register
All class groups
Latest entries
Top 10 charts
Blog
Forums
Shop
Help
Login
Register
please add a total sum function...
Search
All class groups
Latest entries
Top 10 charts
Blog
Forums
Shop
Help
Recommend
this page to a friend!
Shopping Cart
>
Shopping Cart package blog
>
How to Create a Simpl...
>
All threads
>
please add a total sum function...
>
(Un) Subscribe thread alerts
Subject:
please add a total sum function...
Summary:
please add a total sum function...
Messages:
2
Author:
mahdi ghas
Date:
2015-09-21 12:49:04
1. please add a total sum function...
Reply
Report abuse
mahdi ghas - 2015-09-21 12:49:04
hi
please add a total sum function...
tnx
2. Re: please add a total sum function...
Reply
Report abuse
Ashraf Gheith - 2015-09-22 07:26:00 -
In reply to
message 1
from mahdi ghas
public function totalCart(){
$total = 0;
if($_SESSION['cart'] != ""){
$cart = json_decode($_SESSION['cart'], true);
for($i=0;$i<count($cart);$i++){
$lines = $this->getProductData($cart[$i]["product"]);
$total += ($lines->price*$cart[$i]["count"]);
}
}
return $total;
}
Just add this method to the cart.
About us
Advertise on this site
Site map
Newsletter
Statistics
Site tips
Privacy policy
Contact
Copyright (c)
Icontem
1999-2024
For more information send a message to
info at phpclasses dot org
.
image/svg+xml
image/svg+xml
Contact us using Messenger