Staffelpreise -> Grundpreis - Rundungsfehler

26.01.2017 14:48
#1
FrankG.
User FrankG.
Name: Frank
30.11.2011
Posts: 1600
Quote
Staffelpreise -> Grundpreis - Rundungsfehler

Hallo webdesigner,

bei Staffelpreisen mit Nettopreis Anzeige im Shop wird der Grundpreis falsch ausgegeben (Rundungsfehler).

Beispiel
ab 1 stk -> 4,58€ -> 22,90€ / kg
ab 11 stk -> 4,49€ -> 22,44€ / kg --- RICHTIG 22,45€ / kg
ab 21 stk -> 4,21€ -> 21,07€ / kg --- RICHTIG 21,05€ / kg


Joomla 3.6.5 / Joomshopping 4.15.1 / PHP 7
Admin brutto / Webseite brutto
Default User -> Firmenkunde -> Nettopreis Anzeige

 
31.01.2017 14:28
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: Staffelpreise -> Grundpreis - Rundungsfehler

Will be fixed in new version

/components/com_jshopping/tables/product.php

function getBasicPriceInfo(){
$this->product_basic_price_show = $this->weight_volume_units!=0;
if (!$this->product_basic_price_show) return 0;
$jshopConfig = JSFactory::getConfig();
$units = JSFactory::getAllUnits();
$unit = $units[$this->basic_price_unit_id];
if ($jshopConfig->calc_basic_price_from_product_price){
$this->product_basic_price_wvu = $this->weight_volume_units;
}else{
$this->product_basic_price_wvu = $this->getWeight_volume_units();
}
$this->product_basic_price_weight = $this->product_basic_price_wvu / $unit->qty;
if ($jshopConfig->calc_basic_price_from_product_price){
$prod_price = $this->product_price_wp;
}else{
$prod_price = $this->product_price_calculate1;
}
if ($jshopConfig->price_product_round){
$prod_price = round($prod_price, $jshopConfig->decimal_count);
}
$this->product_basic_price_calculate = $prod_price / $this->product_basic_price_weight;
$this->product_basic_price_unit_name = $unit->name;
$this->product_basic_price_unit_qty = $unit->qty;
JDispatcher::getInstance()->trigger('onAfterGetBasicPriceInfoProduct', array(&$this));
return 1;
}

 


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.