Hey List,
I just tried to use item discount (bundles) and realised that it is
not working, or at least not working as I expected it to work.
What I did:
I created a discount of type "itm" then I selected an bundle article
and set the amount to 2 and checked "multiply".
What I expected:
When I add update the amount of an article to 2 I expected the amount
of the bundled article to be 4 (2*2) but the amount is not changing.
So I had a look into the source code and found in oxdiscount.php
public function getBundleAmount( $dAmount )
{
$dItemAmount = $this->oxdiscount__oxitmamount->value;
// Multiplying bundled articles count, if allowed
if ( $this->oxdiscount__oxitmmultiple->value && $this-
>oxdiscount__oxamount->value > 0 ) {
$dItemAmount = floor( $dAmount / $this-
>oxdiscount__oxamount->value ) * $this->oxdiscount__oxitmamount->value;
}
return $dItemAmount;
}
Why is the function using "oxdiscount__oxamount" and not only
"oxdiscount__oxitmamount"
I expected it to be: floor($dAmount * this->oxdiscount__oxitmamount-
>value);
So am I wrong or is here a bug ?
Regards
Mathias
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general