Page 1 of 1

Product option EAN in admin -> sale/order

Posted: Tue May 31, 2016 6:01 pm
by mbeerden
I would like to add the product_option_value EAN to my order in the Admin section. I have found the controller with the getOrderOptions function who handles the retreival of the options data.

Is there a way that i can use the order_option -> product_option_id to get the EAN code from the product_option_value table within this function? (i have installed a mod to add the EAN to the product_option _value table)

Can anyone help me to find a best practice method to solve this callenge?
public function getOrderOptions($order_id, $order_product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . (int)$order_product_id . "'");

// Get option EAN from product_option_value table by product_option_value_id

return $query->rows;
}
Thanks!

Re: Product option EAN in admin -> sale/order

Posted: Wed Jun 01, 2016 3:36 pm
by imdevlper18
If you have already added a module where ean is saved with product_option_value table.
Then you need to save this while order is created with each order_product_option.

And then use this on sales - order page.