Jump to content

errore aggiornamento stato ordine


overbags

Recommended Posts

ciao a tutti.

oggi pomeriggio così senza motivo apparente non mi fa cambiare lo stato dell'ordine mi appare questo errore.

 

di nuovo da stamattina che funzionava ho solo cambiato lo stato di un ordine fornitore da convalidato a ordine ricevuto completamente

 

----------------------------------------------------

[PrestaShopException]

Property Order->date_add is not valid
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.
Link to comment
Share on other sites

[PrestaShopException]

Property Order->date_add is not valid

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 fields

    242. * @throws PrestaShopException

    243. */

    244. public function getFields()

    245. {

    246. $this->validateFields();

    247. $fields = $this->formatFields(self::FORMAT_COMMON);

    248.

    249. // For retro compatibility

    250. 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 20 - override/classes/order/Order.php]
    15.     

    16.     public     $payment_fee;

    17.     public     $payment_fee_rate;

    18.     public function getFields()

    19.     {

    20.         $fields = parent::getFields();

    21.         $fields['payment_fee'] = (float)($this->payment_fee);

    22.         $fields['payment_fee_rate'] = (float)($this->payment_fee_rate);

    23.         return $fields;

    24.     }

    25.     

  • Order->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 update

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

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

    304. $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 531 - controllers/admin/AdminOrdersController.php] - [3 Arguments]
    526.

    527. $use_existings_payment = false;

    528. if (!$order->hasInvoice()) {

    529. $use_existings_payment = true;

    530. }

    531. $history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment);

    532.

    533. $carrier = new Carrier($order->id_carrier, $order->id_lang);

    534. $templateVars = array();

    535. if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) {

    536. $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));

  • AdminOrdersControllerCore->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 ajaxProcess

    178. $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 controller

    367. $controller->run();

    368. } catch (PrestaShopException $e) {

    369. $e->displayMessage();

    370. }

    371. }

    372.

  • DispatcherCore->dispatch - [line 58 - admin/index.php]
    53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {

    54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);

    55. }

    56.

    57. // Prepare and trigger admin dispatcher

    58. Dispatcher::getInstance()->dispatch();

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