Post by haydent » Mon Dec 17, 2018 2:39 pm

alter order_option table to support this

Code: Select all

ALTER TABLE `order_option` ADD `price` DECIMAL( 15, 4 ) NOT NULL ;

/catalog/model/checkout/order.php
/catalog/model/d_quickcheckout/order.php
change both inserts to look like this:

Code: Select all

$this->db->query("INSERT INTO " . DB_PREFIX . "order_option SET order_id = '" . (int)$order_id . "', order_product_id = '" . (int)$order_product_id . "', product_option_id = '" . (int)$option['product_option_id'] . "', product_option_value_id = '" . (int)$option['product_option_value_id'] . "', name = '" . $this->db->escape($option['name']) . "', `value` = '" . $this->db->escape($option['value']) . "', `type` = '" . $this->db->escape($option['type']) . "', `price` = '" . $this->db->escape($option['price']) . "'");
no you need to change any uses of the add and edit order moder function your site uses: eg grep: model_checkout_order->addOrder or editOrder
for me: /catalog/controller/api/order.php , catalog\controller\extension\payment\pp_express.php ,
catalog\controller\checkout\confirm.php
catalog/controller/d_quickcheckout/ confirm.php

change both bits with this type line to have my new line

Code: Select all

'type'                    => $option['type'],
'price'		       => ($option['price_prefix'] == '-' ? $option['price']*-1:$option['price']) //hayden
that should get it into your db, now how and where you save it is up to you, just make changes pull that data out and show it , ie invoice MVC

User avatar
New member

Posts

Joined
Wed Nov 09, 2011 9:50 am
Location - Sydney, Australia
Who is online

Users browsing this forum: No registered users and 8 guests