bigginerjl Posted November 2, 2017 Share Posted November 2, 2017 hello, i'm trying to add a part of the value of the product_refernce in a new field of the order_detail database. i create the new field in the database but i can't manage to add a value in the new field. i modificated the OrderDetail.php file in the claases/order. but nothing happen. i tried to put only the 3 value on the field but nothing -----------------here is a part of my overide <?php class OrderDetail extends OrderDetailCore { //Nouveaux paramètres de classe public $id_abo; protected function create(Order $order, Cart $cart, $product, $id_order_state, $id_order_invoice, $use_taxes = true, $id_warehouse = 0) { if ($use_taxes) { $this->tax_calculator = new TaxCalculator(); } $this->id = null; $this->id_abo = '22'; // new field --------------------------------------------------- thank you in advance Link to comment Share on other sites More sharing options...
bigginerjl Posted November 2, 2017 Author Share Posted November 2, 2017 hello; does anyone know ,wich file i have to overwride for adding value on my order_detail table during the checkout process? Thank you Link to comment Share on other sites More sharing options...
amine Posted February 26, 2018 Share Posted February 26, 2018 Hello , I facing the same problem , did you find a solution ? if not until i resolve that problem i sand you the solution . Thanks Link to comment Share on other sites More sharing options...
jgamio Posted February 27, 2018 Share Posted February 27, 2018 First to able to the Class control the field you need add it to the $definition not just like a public var Second you can set the value before add the register on the database using the public function add($autodate = true, $null_values = false){ $this->yourvar = 'anything'; return parent::add($autodate, $null_values); } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now