Post by mbeerden » Tue May 31, 2016 6:01 pm

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!

New member

Posts

Joined
Tue Nov 03, 2009 5:06 am

Post by imdevlper18 » Wed Jun 01, 2016 3:36 pm

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.

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm
Who is online

Users browsing this forum: No registered users and 4 guests