Jump to content

Property Order->Payment Is Empty


emoes

Recommended Posts

Hello All,

 

Prestashop 1.6.1.2 - Template: UHU Soluta - Payment module: Mollie Payment 1.2.3

 

I'm receiving a error in the back-end when changing a order status (via the web back-end) manually form lets say "waiting for payment" to Payment excepted.

I looked around on this forum and found some topics regarding translation of the PayPal modul, but i'm not using this module.

Also I found a topic saying that I need to update order.php (in override/classes) and AdminTranslationsController.php (in controllers\admin) but both are up to date with the suggested overrides.

 

I Think the issue (but not sure) was started when i add the Mollie IDeal payment module (all translations are there for the Dutch language, but I'm not sure about this)

 

When I look in the database I see the order is there, but has no "Payment" and no "Module" (but that looks OO, because the order status is not yet changed. Maybe the Giftcard "is marked/cheked and has status "Null" but that does'n like to be the problem if you ask me.

 

I Also have the option to use eMagicOne Prestashop storemanager. Her I CAN update the status of an order. (after a page refresh this is also showing in the web backend)

 

The logfiles on the server are not showing errors during the reproduction of this error.

 

The exact error I receive is:

 

[PrestaShopException]

Property Order->payment is empty
at line 909 in file classes/ObjectModel.php

904.             }905. 906.             $message = $this->validateField($field, $this->$field);907.             if ($message !== true) {908.                 if ($die) {909.                     throw new PrestaShopException($message);910.                 }911.                 return $error_return ? $message : false;912.             }913.         }914. 
  • ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php]
    241.      * @return array All object fields242.      * @throws PrestaShopException243.      */244.     public function getFields()245.     {246.         $this->validateFields();247.         $fields = $this->formatFields(self::FORMAT_COMMON);248. 249.         // For retro compatibility250.         if (Shop::isTableAssociated($this->def['table'])) {251.             $fields = array_merge($fields, $this->getFieldsShop());
  • ObjectModelCore->getFields - [line 304 - classes/order/Order.php]
    299.     {300.         if (!$this->id_lang) {301.             $this->id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $this->id_shop);302.         }303. 304.         return parent::getFields();305.     }306. 307.     public function add($autodate = true, $null_values = true)308.     {309.         if (parent::add($autodate, $null_values)) {
  • OrderCore->getFields - [line 652 - classes/ObjectModel.php]
    647. 648.         if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) {649.             $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);650.         }651.         // Database update652.         if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values)) {653.             return false;654.         }655. 656.         // Database insertion for multishop fields related to the object657.         if (Shop::isTableAssociated($this->def['table'])) {
  • ObjectModelCore->update - [line 306 - classes/order/OrderHistory.php]
    301.         }302. 303.         // the order is valid if and only if the invoice is available and the order is not cancelled304.         $order->current_state = $this->id_order_state;305.         $order->valid = $new_os->logable;306.         $order->update();307. 308.         if ($new_os->invoice && !$order->invoice_number) {309.             $order->setInvoice($use_existing_payment);310.         } elseif ($new_os->delivery && !$order->delivery_number) {311.             $order->setDeliverySlip();
  • OrderHistoryCore->changeIdOrderState - [line 99 - override/controllers/admin/AdminOrdersController.php] - [3 Arguments]
    94. 						$history->id_order = $order->id;95. 						$history->id_employee = (int)$this->context->employee->id;96. 						$use_existings_payment = false;97. 						if (!$order->hasInvoice())98. 							$use_existings_payment = true;99. 						$history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment);100. 						$carrier = new Carrier($order->id_carrier, $order->id_lang);101. 						$templateVars = array();102. 						if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number)103. 							$templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));104. 						if ($history->addWithemail(true, $templateVars))
  • AdminOrdersController->postProcess - [line 178 - classes/controller/Controller.php]
    173.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {174.                 $this->setMedia();175.             }176. 177.             // postProcess handles ajaxProcess178.             $this->postProcess();179. 180.             if (!empty($this->redirect_after)) {181.                 $this->redirect();182.             }183. 
  • ControllerCore->run - [line 367 - classes/Dispatcher.php]
    362.             if (isset($params_hook_action_dispatcher)) {363.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364.             }365. 366.             // Running controller367.             $controller->run();368.         } catch (PrestaShopException $e) {369.             $e->displayMessage();370.         }371.     }372. 
  • DispatcherCore->dispatch - [line 58 - admin7968/index.php]
    53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {54.     $_REQUEST['controller'] = strtolower($_REQUEST['tab']);55. }56. 57. // Prepare and trigger admin dispatcher58. Dispatcher::getInstance()->dispatch();

 

 

 

post-694033-0-13915300-1451429154_thumb.png

post-694033-0-79352400-1451429154_thumb.png

Link to comment
Share on other sites

Please, lease, please help.

Anyone who can help me out with this problem.

I already switched of the Mollie module but the problem is still there.

I can not switch status (any status) manually if a customer pays via a bank-wire to the status payed (without having this error)

When  customer pays via iDeal then status can be switched.

 

It looks like the status changes does not update the type of payment is used.

 

Thank you.

 

Alex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...