fixes to make the totals add up correctly
This commit is contained in:
parent
e02807a850
commit
fbcc99001b
1 changed files with 7 additions and 4 deletions
|
|
@ -389,12 +389,15 @@ sub www_checkoutSubmit {
|
||||||
$transaction = WebGUI::Commerce::Transaction->new($session, 'new');
|
$transaction = WebGUI::Commerce::Transaction->new($session, 'new');
|
||||||
|
|
||||||
foreach (@{$currentPurchase->{items}}) {
|
foreach (@{$currentPurchase->{items}}) {
|
||||||
$transaction->addItem($_->{item}, $_->{quantity});
|
my $priceLineItem = ($_->{item}->{priceLineItem})
|
||||||
# use the item plugin's lineItem method for price override
|
|
||||||
# situations.
|
|
||||||
$amount += ($_->{item}->{priceLineItem})
|
|
||||||
# pass in the quantity and the normal items in the cart.
|
# pass in the quantity and the normal items in the cart.
|
||||||
?($_->{item}->priceLineItem($_->{quantity},\@copyOfNormal))
|
?($_->{item}->priceLineItem($_->{quantity},\@copyOfNormal))
|
||||||
|
:undef);
|
||||||
|
$transaction->addItem($_->{item}, $_->{quantity},$priceLineItem);
|
||||||
|
# use the item plugin's lineItem method for price override
|
||||||
|
# situations.
|
||||||
|
$amount += ($priceLineItem)
|
||||||
|
?($priceLineItem)
|
||||||
:($_->{item}->price * $_->{quantity});
|
:($_->{item}->price * $_->{quantity});
|
||||||
$var->{purchaseDescription} .= $_->{quantity}.' x '.$_->{item}->name.'<br />';
|
$var->{purchaseDescription} .= $_->{quantity}.' x '.$_->{item}->name.'<br />';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue