Hi list,
version 4.5.2 CE, file: core/oxarticles.php
method _assignPrices, line 3785ff
-----------------------
// compute price
$dPrice = $this->getPrice()->getBruttoPrice();
$oCur = $myConfig->getActShopCurrencyObject();
//price per unit handling
if ((double) $this->oxarticles__oxunitquantity->value &&
$this->oxarticles__oxunitname->value) {
$this->_fPricePerUnit =
oxLang::getInstance()->formatCurrency($dPrice / (double)
$this->oxarticles__oxunitquantity->value, $oCur);
}
----------------------
In most cases $dPrice and $oCur is calculated but not used.
We can save that time.
Change to:
----------------------
//price per unit handling
if ((double) $this->oxarticles__oxunitquantity->value &&
$this->oxarticles__oxunitname->value) {
// compute price
$dPrice = $this->getPrice()->getBruttoPrice();
$oCur = $myConfig->getActShopCurrencyObject();
$this->_fPricePerUnit =
oxLang::getInstance()->formatCurrency($dPrice / (double)
$this->oxarticles__oxunitquantity->value, $oCur);
}
----------------------
Best regards,
--
Daniel Schlichtholz Mayflower GmbH
Pleichertorstraße 2 Tel.: +49 931 359 65 1125
D-97070 Würzburg Fax : +49 931 359 65 28
[email protected] http://www.mayflower.de
Mayflower GmbH, Standort Würzburg
Firmensitz: Mannhardtstrasse 6, 80538 München
Registergericht: Amtsgericht München, HRB 142039
Geschäftsführer: Gregor Streng, Björn Schotte,
Albrecht Günther, Johann-Peter Hartmann
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general