Jump to content

Product not display in order detail


Recommended Posts

Unknown column 'original_wholesale_price' in 'field list'
 

INSERT INTO `ps_order_detail` (`id_order`, `id_order_invoice`, `id_warehouse`, `id_shop`, `product_id`, `product_attribute_id`, `product_name`, `product_quantity`, `product_quantity_in_stock`, `product_quantity_return`, `product_quantity_refunded`, `product_quantity_reinjected`, `product_price`, `reduction_percent`, `reduction_amount`, `reduction_amount_tax_incl`, `reduction_amount_tax_excl`, `group_reduction`, `product_quantity_discount`, `product_ean13`, `product_upc`, `product_reference`, `product_supplier_reference`, `product_weight`, `tax_name`, `tax_rate`, `tax_computation_method`, `id_tax_rules_group`, `ecotax`, `ecotax_tax_rate`, `discount_quantity_applied`, `download_hash`, `download_nb`, `download_deadline`, `unit_price_tax_incl`, `unit_price_tax_excl`, `total_price_tax_incl`, `total_price_tax_excl`, `total_shipping_price_tax_excl`, `total_shipping_price_tax_incl`, `purchase_supplier_price`, `original_product_price`, `original_wholesale_price`) VALUES ('19', '0', '0', '1', '17', '0', 'IMUNOFORTE', '1', '1', '0', '0', '0', '12.096774', '0', '0', '0', '0', '0', '0', '', '', 'SUP004', '', '0', '', '0', '0', '53', '0', '0', '0', '', '0', '0000-00-00 00:00:00', '15', '12.096774', '15', '12.1', '0', '0', '0', '12.096774', '0')

at line 791 in file classes/db/Db.php

786.         if ($webservice_call && $errno) {787.             $dbg = debug_backtrace();788.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790.             if ($sql) {791.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792.             }793. 794.             throw new PrestaShopDatabaseException($this->getMsgError());795.         }796.     }
Link to comment
Share on other sites

  • 2 months later...

Hi fabio, thanks for reply. 

 

I have created manually the missing columns (2 because there was 2 products in the order) in the db. Thanks to this I can stamp the PDF and see the complete order in the backoffice, but I am scared about the idea that this won't be generated automatically next time...

Edited by laurapessoa (see edit history)
Link to comment
Share on other sites

since I upgraded to version 1.6 orders are not register in the table ps_detail.
If I try with the last order:
SELECT *
FROM `ps_order_detail` or
LEFT JOIN `ps_product` p ON (p.id_product = od.product_id)
LEFT JOIN `ps_product_shop` ps ON (ps.id_product = p.id_product
AND ps.id_shop = od.id_shop)
WHERE od.`id_order` = 224 <- not showing last order
the result is' MySQL returned an empty set (ie zero rows). "
 
however if I write:
SELECT *
FROM `ps_order_detail` or
LEFT JOIN `ps_product` p ON (p.id_product = od.product_id)
LEFT JOIN `ps_product_shop` ps ON (ps.id_product = p.id_product
AND ps.id_shop = od.id_shop)
WHERE od.`id_order` = 213 <- last placed order
the result are correct, there are three products on order, 3 records registrered.
 
ps_order_detail not record incoming orders!!
Help meee
Edited by DanieleDR (see edit history)
Link to comment
Share on other sites

This is the resul of the debug mode:

[PrestaShopException]

Property StockAvailable->id_product_attribute 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.
Link to comment
Share on other sites

  • 1 month later...

After all this time creating order details manually.... I have noticed that comparing with other website that works perfectly I was missing the last column in the ps_order_detail, it is called  original_wholesale_price.

 

I have created it manually copying from the other DB and I hope it works for the next time, because I can't get enought of create products in orders manually....

 

I will let you know.

Link to comment
Share on other sites

×
×
  • Create New...