I am using OC 3.0.3.5 and want to record extra field for oc_order_product table.
In admin/controller/sale/order.php
Code: Select all
// Products
$data['order_products'] = array();
$products = $this->model_sale_order->getOrderProducts($this->request->get['order_id']);
foreach ($products as $product) {
$data['order_products'][] = array(
'product_id' => $product['product_id'],
'name' => $product['name'],
'model' => $product['model'],
'option' => $this->model_sale_order->getOrderOptions($this->request->get['order_id'], $product['order_product_id']),
'quantity' => $product['quantity'],
'price' => $product['price'],
'total' => $product['total'],
'reward' => $product['reward']
);
}
Code: Select all
'mpn' =>$product['mpn']
QuestionALTER TABLE oc_order_product ADD mpn VARCHAR (12) NOT NULL;
How can i pull this value without showing it on checkout? So when customer place an order i should have the value for mpn as well along with others.
p.s: mpn value will be declared when adding/editing the product.