Jump to content
  • 0

Błąd przy potwierdzaniu zamówienia [PrestaShopException]


Danthee

Question

Witam,

 

Cały sklep działa bez zarzutu, natomiast przy potwierdzaniu zamówienia (po wybraniu sposobu płatności) wyskakuje bład.

 

Zrobiłem debuga i mam coś takiego:

 

[PrestaShopException]

Property OrderHistory->id_order_state 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 487 - classes/ObjectModel.php]
    482. 483.         // Database insertion484.         if (Shop::checkIdShopDefault($this->def['table'])) {485.             $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);486.         }487.         if (!$result = Db::getInstance()->insert($this->def['table'], $this->getFields(), $null_values)) {488.             return false;489.         }490. 491.         // Get object id in database492.         $this->id = Db::getInstance()->Insert_ID();
  • ObjectModelCore->add - [line 482 - classes/order/OrderHistory.php] - [1 Arguments]
    477.         return true;478.     }479. 480.     public function add($autodate = true, $null_values = false)481.     {482.         if (!parent::add($autodate)) {483.             return false;484.         }485. 486.         $order = new Order((int)$this->id_order);487.         // Update id_order_state attribute in Order
    Argument [0]1
  • OrderHistoryCore->add - [line 399 - classes/order/OrderHistory.php] - [1 Arguments]
    394.      */395.     public function addWithemail($autodate = true, $template_vars = false, Context $context = null)396.     {397.         $order = new Order($this->id_order);398. 399.         if (!$this->add($autodate)) {400.             return false;401.         }402. 403.         if (!$this->sendEmail($order, $template_vars)) {404.             return false;
    Argument [0]1
  • OrderHistoryCore->addWithemail - [line 690 - classes/PaymentModule.php]
    685.                     // Switch to back order if needed686.                     if (Configuration::get('PS_STOCK_MANAGEMENT') && ($order_detail->getStockState() || $order_detail->product_quantity_in_stock <= 0)) {687.                         $history = new OrderHistory();688.                         $history->id_order = (int)$order->id;689.                         $history->changeIdOrderState(Configuration::get($order->valid ? 'PS_OS_OUTOFSTOCK_PAID' : 'PS_OS_OUTOFSTOCK_UNPAID'), $order, true);690.                         $history->addWithemail();691.                     }692. 693.                     unset($order_detail);694. 695.                     // Order is reloaded because the status just changed
  • PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]
    59. 			'{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),60. 			'{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),61. 			'{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))62. 		);63. 64. 		$this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);65. 		Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key);66. 	}67. }
    Argument [0]262Argument [1]10Argument [2]1317Argument [3]Przelew na kontoArgument [4]Argument [5]Array(    [{bankwire_owner}] => coś tam    [{bankwire_details}] => coś tam    [{bankwire_address}] => gdzieś tam)Argument [6]3Argument [7]Argument [8]cb87962c479b1e768eb8db2d00ac1c94
  • BankwireValidationModuleFrontController->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 28 - index.php]

Bardzo bym prosił o pomoc, zupełnie nie wiem jak to rozwiązać...

 

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

wygląda to tak, jakby nie istniał status płatności przelewem, tj. w trakcie skłądania zamówienia presta nie przypisuje statusu w tabeli ze statusami

zwykle ten status ma ID 10

czy na liście statusów w orders > statuses istnieje taki status zamówienia?

Link to comment
Share on other sites

  • 0

Proponował bym sprawdzić bazę danych.

Tabela PREFIX_configuration

czy są wpisy:

PS_OS_OUTOFSTOCK_PAID

PS_OS_OUTOFSTOCK_UNPAID

 

Tabele PREFIX_order_state i PREFIX_order_state_lang

czy masz wszystkie 14 systemowe statusy.

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...