Jump to content

error when changing order status to shipped


jlennon1863

Recommended Posts

When I try to change the order status to "shipped", I get the error message below. Can someone tell me how to fix this?

 

 

[PrestaShopException]

Property OrderPayment->order_reference length (13) must be between 0 and 9
at line 846 in file classes/ObjectModel.php

840. 841. 			$message = $this->validateField($field, $this->$field);842. 			if ($message !== true)843. 			{844. 				if ($die)845. 					throw new PrestaShopException($message);846. 				return $error_return ? $message : false;847. 			}848. 		}849. 850. 		return true;
  • ObjectModelCore->validateFields - [line 260 - classes/ObjectModel.php]
    254. 	 *255. 	 * @return array All object fields256. 	 */257. 	public function getFields()258. 	{259. 		$this->validateFields();260. 		$fields = $this->formatFields(self::FORMAT_COMMON);261. 262. 		// For retro compatibility263. 		if (Shop::isTableAssociated($this->def['table']))264. 			$fields = array_merge($fields, $this->getFieldsShop());
  • ObjectModelCore->getFields - [line 464 - classes/ObjectModel.php]
    458. 		}459. 		460. 		// Database insertion461. 		if (Shop::checkIdShopDefault($this->def['table']))462. 			$this->id_shop_default = min($id_shop_list);463. 		if (!$result = ObjectModel::$db->insert($this->def['table'], $this->getFields(), $null_values))464. 			return false;465. 466. 		// Get object id in database467. 		$this->id = ObjectModel::$db->Insert_ID();468. 
  • ObjectModelCore->add - [line 64 - classes/order/OrderPayment.php] - [2 Arguments]
    58. 		),59. 	);60. 61. 	public function add($autodate = true, $nullValues = false)62. 	{63. 		if (parent::add($autodate, $nullValues))64. 		{65. 			Hook::exec('actionPaymentCCAdd', array('paymentCC' => $this));66. 			return true;67. 		}68. 		return false;
    Argument [0]1Argument [1]
  • OrderPaymentCore->add - [line 425 - classes/ObjectModel.php] - [2 Arguments]
    419. 	 * @param bool $autodate420. 	 * @return boolean Insertion result421. 	 */422. 	public function save($null_values = false, $autodate = true)423. 	{424. 		return (int)$this->id > 0 ? $this->update($null_values) : $this->add($autodate, $null_values);425. 	}426. 427. 	/**428. 	 * Add current object to database429. 	 *
    Argument [0]1Argument [1]
  • ObjectModelCore->save - [line 320 - classes/order/OrderHistory.php]
    314. 					else315. 						$order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2);316. 					$order->save();317. 						318. 					$payment->conversion_rate = 1;319. 					$payment->save();320. 					Db::getInstance()->execute('321. 					INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` (`id_order_invoice`, `id_order_payment`, `id_order`)322. 					VALUES('.(int)$invoice->id.', '.(int)$payment->id.', '.(int)$order->id.')');323. 				}324. 			}
  • OrderHistoryCore->changeIdOrderState - [line 491 - controllers/admin/AdminOrdersController.php] - [3 Arguments]
    485. 						$history->id_employee = (int)$this->context->employee->id;486. 487. 						$use_existings_payment = false;488. 						if (!$order->hasInvoice())489. 							$use_existings_payment = true;490. 						$history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment);491. 492. 						$carrier = new Carrier($order->id_carrier, $order->id_lang);493. 						$templateVars = array();494. 						if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number)495. 							$templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));
    Argument [0]4Argument [1]Order Object(    [id_address_delivery] => 53    [id_address_invoice] => 47    [id_shop_group] => 1    [id_shop] => 1    [id_cart] => 4290    [id_currency] => 1    [id_lang] => 1    [id_customer] => 32    [id_carrier] => 1    [current_state] => 4    [secure_key] => 34dd19c6a22ddfac34da2ec8894ce904    [payment] => PayPal Express Checkout    [module] => cheque    [conversion_rate] => 1.000000    [recyclable] => 0    [gift] => 0    [gift_message] =>     [mobile_theme] => 0    [shipping_number] =>     [total_discounts] => 0.00    [total_discounts_tax_incl] => 0.00    [total_discounts_tax_excl] => 0.00    [total_paid] => 86.95    [total_paid_tax_incl] => 86.95    [total_paid_tax_excl] => 86.95    [total_paid_real] => 173.9    [total_products] => 78.00    [total_products_wt] => 78.00    [total_shipping] => 8.95    [total_shipping_tax_incl] => 8.95    [total_shipping_tax_excl] => 8.95    [carrier_tax_rate] => 0.000    [total_wrapping] => 0.00    [total_wrapping_tax_incl] => 0.00    [total_wrapping_tax_excl] => 0.00    [invoice_number] => 197004    [delivery_number] => 0    [invoice_date] => 2014-11-17 08:30:29    [delivery_date] => 2014-11-01 19:21:28    [valid] => 1    [date_add] => 2014-11-01 19:21:28    [date_upd] => 2014-11-22 08:16:06    [reference] => 545955cd12035    [webserviceParameters:protected] => Array        (            [objectMethods] => Array                (                    [add] => addWs                )            [objectNodeName] => order            [objectsNodeName] => orders            [fields] => Array                (                    [id_address_delivery] => Array                        (                            [xlink_resource] => addresses                        )                    [id_address_invoice] => Array                        (                            [xlink_resource] => addresses                        )                    [id_cart] => Array                        (                            [xlink_resource] => carts                        )                    [id_currency] => Array                        (                            [xlink_resource] => currencies                        )                    [id_lang] => Array                        (                            [xlink_resource] => languages                        )                    [id_customer] => Array                        (                            [xlink_resource] => customers                        )                    [id_carrier] => Array                        (                            [xlink_resource] => carriers                        )                    [current_state] => Array                        (                            [xlink_resource] => order_states                        )                    [module] => Array                        (                            [required] => 1                        )                    [invoice_number] => Array                        (                        )                    [invoice_date] => Array                        (                        )                    [delivery_number] => Array                        (                        )                    [delivery_date] => Array                        (                        )                    [valid] => Array                        (                        )                    [date_add] => Array                        (                        )                    [date_upd] => Array                        (                        )                    [shipping_number] => Array                        (                            [getter] => getWsShippingNumber                            [setter] => setWsShippingNumber                        )                )            [associations] => Array                (                    [order_rows] => Array                        (                            [resource] => order_rows                            [setter] =>                             [virtual_entity] => 1                            [fields] => Array                                (                                    [id] => Array                                        (                                        )                                    [product_id] => Array                                        (                                            [required] => 1                                        )                                    [product_attribute_id] => Array                                        (                                            [required] => 1                                        )                                    [product_quantity] => Array                                        (                                            [required] => 1                                        )                                    [product_name] => Array                                        (                                            [setter] =>                                         )                                    [product_reference] => Array                                        (                                            [setter] =>                                         )                                    [product_ean13] => Array                                        (                                            [setter] =>                                         )                                    [product_upc] => Array                                        (                                            [setter] =>                                         )                                    [product_price] => Array                                        (                                            [setter] =>                                         )                                    [unit_price_tax_incl] => Array                                        (                                            [setter] =>                                         )                                    [unit_price_tax_excl] => Array                                        (                                            [setter] =>                                         )                                )                        )                )        )    [_taxCalculationMethod:protected] => 1    [id] => 4271    [id_shop_list] =>     [get_shop_from_context:protected] => 1    [table:protected] => orders    [identifier:protected] => id_order    [fieldsRequired:protected] => Array        (            [0] => id_address_delivery            [1] => id_address_invoice            [2] => id_cart            [3] => id_currency            [4] => id_lang            [5] => id_customer            [6] => id_carrier            [7] => payment            [8] => module            [9] => total_paid            [10] => total_paid_real            [11] => total_products            [12] => total_products_wt            [13] => conversion_rate        )    [fieldsSize:protected] => Array        (        )    [fieldsValidate:protected] => Array        (            [id_address_delivery] => isUnsignedId            [id_address_invoice] => isUnsignedId            [id_cart] => isUnsignedId            [id_currency] => isUnsignedId            [id_shop_group] => isUnsignedId            [id_shop] => isUnsignedId            [id_lang] => isUnsignedId            [id_customer] => isUnsignedId            [id_carrier] => isUnsignedId            [current_state] => isUnsignedId            [secure_key] => isMd5            [payment] => isGenericName            [module] => isModuleName            [recyclable] => isBool            [gift] => isBool            [gift_message] => isMessage            [mobile_theme] => isBool            [total_discounts] => isPrice            [total_discounts_tax_incl] => isPrice            [total_discounts_tax_excl] => isPrice            [total_paid] => isPrice            [total_paid_tax_incl] => isPrice            [total_paid_tax_excl] => isPrice            [total_paid_real] => isPrice            [total_products] => isPrice            [total_products_wt] => isPrice            [total_shipping] => isPrice            [total_shipping_tax_incl] => isPrice            [total_shipping_tax_excl] => isPrice            [carrier_tax_rate] => isFloat            [total_wrapping] => isPrice            [total_wrapping_tax_incl] => isPrice            [total_wrapping_tax_excl] => isPrice            [shipping_number] => isTrackingNumber            [conversion_rate] => isFloat            [date_add] => isDate            [date_upd] => isDate        )    [fieldsRequiredLang:protected] => Array        (        )    [fieldsSizeLang:protected] => Array        (        )    [fieldsValidateLang:protected] => Array        (        )    [tables:protected] => Array        (        )    [image_dir:protected] =>     [image_format:protected] => jpg    [def:protected] => Array        (            [table] => orders            [primary] => id_order            [fields] => Array                (                    [id_address_delivery] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_address_invoice] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_cart] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_currency] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_shop_group] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                        )                    [id_shop] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                        )                    [id_lang] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_customer] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [id_carrier] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                            [required] => 1                        )                    [current_state] => Array                        (                            [type] => 1                            [validate] => isUnsignedId                        )                    [secure_key] => Array                        (                            [type] => 3                            [validate] => isMd5                        )                    [payment] => Array                        (                            [type] => 3                            [validate] => isGenericName                            [required] => 1                        )                    [module] => Array                        (                            [type] => 3                            [validate] => isModuleName                            [required] => 1                        )                    [recyclable] => Array                        (                            [type] => 2                            [validate] => isBool                        )                    [gift] => Array                        (                            [type] => 2                            [validate] => isBool                        )                    [gift_message] => Array                        (                            [type] => 3                            [validate] => isMessage                        )                    [mobile_theme] => Array                        (                            [type] => 2                            [validate] => isBool                        )                    [total_discounts] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_discounts_tax_incl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_discounts_tax_excl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_paid] => Array                        (                            [type] => 4                            [validate] => isPrice                            [required] => 1                        )                    [total_paid_tax_incl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_paid_tax_excl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_paid_real] => Array                        (                            [type] => 4                            [validate] => isPrice                            [required] => 1                        )                    [total_products] => Array                        (                            [type] => 4                            [validate] => isPrice                            [required] => 1                        )                    [total_products_wt] => Array                        (                            [type] => 4                            [validate] => isPrice                            [required] => 1                        )                    [total_shipping] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_shipping_tax_incl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_shipping_tax_excl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [carrier_tax_rate] => Array                        (                            [type] => 4                            [validate] => isFloat                        )                    [total_wrapping] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_wrapping_tax_incl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [total_wrapping_tax_excl] => Array                        (                            [type] => 4                            [validate] => isPrice                        )                    [shipping_number] => Array                        (                            [type] => 3                            [validate] => isTrackingNumber                        )                    [conversion_rate] => Array                        (                            [type] => 4                            [validate] => isFloat                            [required] => 1                        )                    [invoice_number] => Array                        (                            [type] => 1                        )                    [delivery_number] => Array                        (                            [type] => 1                        )                    [invoice_date] => Array                        (                            [type] => 5                        )                    [delivery_date] => Array                        (                            [type] => 5                        )                    [valid] => Array                        (                            [type] => 2                        )                    [reference] => Array                        (                            [type] => 3                        )                    [date_add] => Array                        (                            [type] => 5                            [validate] => isDate                        )                    [date_upd] => Array                        (                            [type] => 5                            [validate] => isDate                        )                )            [classname] => Order        )    [update_fields:protected] =>     [force_id] => )Argument [2]
  • AdminOrdersControllerCore->postProcess - [line 171 - classes/controller/Controller.php]
    165. 			// setMedia MUST be called before postProcess166. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))167. 				$this->setMedia();168. 169. 			// postProcess handles ajaxProcess170. 			$this->postProcess();171. 172. 			if (!empty($this->redirect_after))173. 				$this->redirect();174. 175. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
  • ControllerCore->run - [line 373 - classes/Dispatcher.php]
    367. 			// Execute hook dispatcher368. 			if (isset($params_hook_action_dispatcher))369. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);370. 371. 			// Running controller372. 			$controller->run();373. 		}374. 		catch (PrestaShopException $e)375. 		{376. 			$e->displayMessage();377. 		}
  • DispatcherCore->dispatch - [line 54 - admin/index.php]
Link to comment
Share on other sites

something is screwed up in the checkout and order admin and I have no idea how to correct it. Here are the issues:

1. some transactions take a long time to complete and then the customer gets an error message (yet the order has completed successfully) so they go back and complete a second order thinking the first one didn't process

2. some orders give me error messages similar to previous post when I attempt to change order status

3. some orders don't show any product in the invoice and No orders are displaying product attributes (size, etc). I have had to email customers for their product options

4. invoices are not displaying customer email

 

The only thing I did was configure the 'order reference change' module . I just disabled it in case that was causing the problem. Any help will be appreciated.

Link to comment
Share on other sites

×
×
  • Create New...