Fehlermeldung bei 0 EUR Bestellung / error for product with 0 EUR

08.05.2013 10:17
#1
Dr.Rivera
Joomshopping forum user no avatar
Name: Jürgen
13.09.2010
Posts: 2276
Quote
Fehlermeldung bei 0 EUR Bestellung / error for product with 0 EUR

Hello webdesigner,

error:
Warning: Division by zero in ............../components/com_jshopping/lib/functions.php on line 779

This is not good. Why?
Some want to use the shop for order office products within a company intranet.
So they need for all products no price or 0 EUR.

Normal order with 0EUR.


Alternative: order without prices for this case


What do you think?


Greetings


Nicht ganz aktuell, aber vielleicht doch noch für einige hilfreich, das E-Book Joomshopping.
Bei Amazon (kindl) und xinxii (ePub):

http://www.amazon.de/JoomShopping-Joomla-Shop-Online-Shop-ebook/dp/B005L9D8MC

http://www.xinxii.com/joomshopping-der-joomla-shop-p-339561.html
 
08.05.2013 11:22
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25922
Quote
Aw: Fehlermeldung bei 0 EUR Bestellung / error for product with 0 EUR

Will be fixed in 3.14.4

 
03.07.2013 19:59
#3
FrankG.
User FrankG.
Name: Frank
30.11.2011
Posts: 1600
Quote
Aw: Fehlermeldung bei 0 EUR Bestellung / error for product with 0 EUR

webdesigner - 08.05.2013 11:22
Will be fixed in 3.14.4

Wann ist mit der Version zu rechnen? Damit das 0,00 Euro Problem gelöst ist.

 
06.07.2013 10:50
#4
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25922
Quote
Aw: Fehlermeldung bei 0 EUR Bestellung / error for product with 0 EUR

components\com_jshopping\lib\functions.php

replace function

function getPriceTaxRatioForProducts($products, $group='tax'){
$prodtaxes = array();
foreach($products as $k=>$v){
if (!isset($prodtaxes[$v[$group]])) $prodtaxes[$v[$group]] = 0;
$prodtaxes[$v[$group]]+= $v['price']*$v['quantity'];
}
$sumproducts = array_sum($prodtaxes);
foreach($prodtaxes as $k=>$v){
if ($sumproducts>0){
$prodtaxes[$k] = $v/$sumproducts;
}else{
$prodtaxes[$k] = 0;
}
}
return $prodtaxes;
}

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.