Om één of andere reden wordt de prijs verdubbeld, en ik kan nergens vinden waarom dit gebeurd.
Als iemand me kan vertellen wat ik fout doe, of wat ik nog mis, dan zal ik heel erg blij zijn :).
<?php
if(count($articles) > 0){
if (count($articles) == 1) {
echo '<span class="wsaantal">Totaal '.count($articles).' product.</span>';
}else{
echo '<span class="wsaantal">Totaal '.count($articles).' producten.</span>';
}
$arraysize = count($articles);
$price = '';
$count = 0;
while ($count <= $arraysize) {
foreach($articles as $line) {
$price = $price + ($line['price']*$line['amount']);
$count++;
}
}
echo '<span class="wsprijs">Prijs: € '.number_format($price + (($price / 100) * $settings['tax']),2, ',', '').'</span><br />';
unset($price);
//echo '<span class="wsprijs">Prijs: € '.number_format(($line['price']*$line['amount']) + ($line['price'] * $line['amount']) / 100 * $settings['tax'],2, ',', '').'</span><br />';
?>
<div id="afrekenen">
<a href="/winkelwagen/">Naar product overzicht »</a>
</div>
<?php
}else{
echo '<li>Geen producten.</li>';
}
?>