This is my code in cart:
<?php
$totaleiva_1 = 0;
$items = $woocommerce->cart->get_cart();
foreach($items as $item ) {
echo $totaleforsebene;
$totaleiva_1 = $totaleiva_1 + $totaleforsebene;
}
echo $totaleiva_1;
?>
The result is: the $totaleforsebene
value of the last product in cart is added n times for product I have (for example I have two products, the last value $totaleforsebene
is added two times).
Instead, I would want to have the $totaleforsebene
for different products and then They are been added.
Thanks for help