VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rune Rasmussen on April 29, 2014, 11:33:31 AM

Title: VM 2.6 KCO Broken
Post by: Rune Rasmussen on April 29, 2014, 11:33:31 AM
Anyone using (or have tested) Klarna Checkout successfully on VM 2.6, new install or updated from previous versions?

I now know about several stores where it's broken. When KCO is selected in cart, debug on and default template, it will output this error on a white page:

QuoteFatal error:  Class 'Klarna_Checkout_Order' not found in ../plugins/vmpayment/klarnacheckout/klarnacheckout.php on line 321
Title: Re: VM 2.6 KCO Broken
Post by: alatak on April 29, 2014, 12:00:41 PM
Hello
Thank you.
I have fixed this issue
and wil do a release pretty soon

Meanwhile
in file
/plugins/vmpayment/klarnacheckout/klarnacheckout.php
add this line before line 321
require_once 'klarnacheckout/library/Checkout.php';
Title: Re: VM 2.6 KCO Broken
Post by: Rune Rasmussen on April 29, 2014, 14:21:05 PM
Thanks,

I noticed that
Quoterequire_once 'klarnacheckout/library/Checkout.php';
allready exists on line 325, so I just moved it to line 320, above:
Quoteif ($this->method->server == 'beta') {

Seems like it's working in default design now, but not in Horme 2 template - but that should be easy to figure out for us.

Btw! The logo is also missing in KCO and the old invoice module. Might be a change required in line 126:
Quoteif (!empty($method->payment_logos)) {

Debugs shows
QuoteNotice:  Undefined variable: logo in ../plugins/vmpayment/klarnacheckout/klarnacheckout.php on line 144
Title: Re: VM 2.6 KCO Broken
Post by: alatak on April 29, 2014, 15:07:28 PM
Hello

QuoteQuote
require_once 'klarnacheckout/library/Checkout.php';
allready exists on line 325, so I just moved it to line 320, above:
Quote
if ($this->method->server == 'beta') {
Yes it is correct. The require line was at the wring place.