View Single Post
  #1  
Old 03-19-2014, 06:31 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 758
 

Default Pass additional charge to order data

I have been working on a 4.4.5 Gold version and I have coded the calculation of an additional handling fee which needs to be passed to the order details data , so the admin can view it in the Orders section and also display it in the order invoice and order notifications.
My question is how do I pass this additional charge in the "func_place_order()" function. The prototype of this function is:
Code:
function func_place_order($payment_method, $order_status, $order_details, $customer_notes, $extra = array(), $extras = array())

Can I use for example, the '$extra' or '$extras' arguments for passing this charge, so it will appear in the admin Order Details page in the admin, or do I need to add a custom field in the 'xcart_order_details' table for inserting this additional charge?
By the way, I have checked this related thread ("Add special handling charge to cart totals"), but the code has changed significantly since then.


Appreciate any help.
Reply With Quote