VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Bollek on August 29, 2013, 15:48:32 PM

Title: empty order_payment value in database after update to 2.0.22b [solved]
Post by: Bollek on August 29, 2013, 15:48:32 PM
Hi,

i'm using VM 2.0.22b and Joomla 2.5.14. I put 3 percentage to the total sale as payment method costs and when a customer orders something all is calculatet well, but after the order nothing is written in table "#__virtuemart_orders" (column: order_payment) of the database. The rest is ok, only the column "order_payment" is empty and therefore customer doesn't see the costs for the payment method in the invoice mail.

Is this a bug or just my false configuration?

bollek
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: agps on August 29, 2013, 17:18:23 PM
Check this http://www.rupostel.com/phpBB3/viewtopic.php?f=5&t=632&sid=d23fb77a735d1ee54cc65a9089cc9114
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: alatak on August 29, 2013, 17:53:16 PM
Hello
I have fixed this issue for the next version

if you are using Paypal, go line 1058
and replace that line
$cart_prices[ $_psType.'Value'] = $feeNoVat;
with
$cart_prices[ $this->_psType .'Value'] = $feeNoVat;

The problem is the same for standard
but line 387
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: Bollek on August 30, 2013, 08:41:05 AM
hi,

thanks for the replies.

@agps
i checked the link, but i don't use the opc plugin  ;)

@alatak
yep, i'm using payal,
i changed the lines in ./plugins/vmpayment/standard/standard.php and ./plugins/vmpayment/paypal/paypal.php, which you mentioned, but "order_payment" is still emtpy in the database.

Have i misunderstood your workaround?
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: alatak on August 30, 2013, 09:17:50 AM
Hello

Can you send me via PM credentials on your website, and i will check.
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: alatak on August 30, 2013, 17:59:02 PM
Hello
Ok i found
You need also to add after those lines
  $NewTotalAmount=($cartTotalAmount+ $method->cost_per_transaction) / (1 -$cost_percent_total);
                $fee=$NewTotalAmount-$cartTotalAmount;
                $cart_prices['salesPrice' . $_psType] = $fee;
                $cart_prices[$this->_psType . 'Tax'] = 0;
                $cart_prices[$this->_psType . '_calc_id'] = 0;
               


this line

$cart_prices[ $this->_psType .'Value'] = $fee;
Title: Re: empty order_payment value in database after update to 2.0.22b
Post by: Bollek on September 02, 2013, 11:18:08 AM
hi,

thank you very much alatak,  that solved the problem.
You are a genius ;D.

bollek