Jump to content

New Prestashop Klarna module locks up, on confirmation of payment


Recommended Posts

Hi

 

I'm using PS v1.4.10.0 and downloaded the latest PS Klarna payment module v1.7.4 from the PS Shop (not Klarnas own). It installed and configured ok and it showed up in the cart OK but after choosing invoice and entering the Personal number on the next page, if I press the button to "Confirm the Order", the whole center and right column dissapears and then nothing happens? No order goes through, any ideas anybody? (I've removed the "Cloudcache" module, just to make sure)

 

BR

David C

Link to comment
Share on other sites

Thanks for you interest Nemo1.

 

Ok turned error checking on and got the following error after pressing the confirm button:

 

Fatal error: Call to undefined method Cart::getTotalShippingCost() in /storage/content/76/152276/andrummet.net/public_html/modules/klarnaprestashop/klarnaprestashop.php on line 1065

 

David C

Link to comment
Share on other sites

  On 4/12/2013 at 8:12 AM, Nemo1 said:

Is that module compatible with 1.4.10?

 

The PS Klarna module from Prestashops own marketplace says, I qoute " Compatibility PrestaShop v1.4.0.0 - v1.5.4.0" and to quote again further down in the text "By PrestaShop The module Klarna for PrestaShop has been developed by the PrestaShop team, guaranteeing full compatibility with PrestaShop's e-commerce software". :unsure:

Link to comment
Share on other sites

You can add this to the cart class, but it's likely to cause troubles

 

/**
* Return shipping total for the cart
*
* @param array $delivery_option Array of the delivery option for each address
* @param booleal $use_tax
* @param Country $default_country
* @return float Shipping total
*/
public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null)
{
 if (is_null($delivery_option))
  $delivery_option = $this->getDeliveryOption($default_country, false, false);
 $total_shipping = 0;
 $delivery_option_list = $this->getDeliveryOptionList();
 foreach ($delivery_option as $id_address => $key)
 {
  if (!isset($delivery_option_list[$id_address]) || !isset($delivery_option_list[$id_address][$key]))
   continue;
  if ($use_tax)
   $total_shipping += $delivery_option_list[$id_address][$key]['total_price_with_tax'];
  else
   $total_shipping += $delivery_option_list[$id_address][$key]['total_price_without_tax'];
 }
 return $total_shipping;
}

Link to comment
Share on other sites

Ok thanks Nemo and Vekia. I prefer not to change/override a core class, especially if it likely to "cause problems". I think I'll just have to go back to Klarnas own "Very Buggy" v2.1.2 module that still does every thing in English as well as have the ability to change my shops tax rules very time I configure it :wacko:, plus I have to do a bit of a code change in their Core file ... Hard work!!!!

Link to comment
Share on other sites

×
×
  • Create New...