View Single Post
  #6  
Old 03-20-2014, 02:42 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Pass additional charge to order data

Quote:
Originally Posted by vasilis
the hidden product solution would require, just before adding the hidden product to cart, changing programmatically it's price, to be the same as the sum of the additional charge per product in the order, is this what you mean?
Exactly.
Quote:
On the other hand, dealing with the order functions is a more 'clean' solution
I disagree and this is why:
Quote:
as long as I make sure that the additional charge amount is passed through to the cart total amount and stored in the order record.
Quote:
Also, I need to display this additional charge in the screen invoice and email notifications as a separate charge, below the tax amount.
Order products already display this info. You just customize the invoice to not show the product above and display it below. This is a much simpler change than tweaking php functions for calculating order totals, shipping, taxes, order history, order editing, etc.
Quote:
By the way, would you happen to have any comments on my previous post, regarding the order functions and variables that I refer to?
Nothing more than what I've already recommended. $extra can be used and you can pull stuff out of it, do calculations with it, and display it on invoices. While old, the other thread that discusses adding extra fields to the checkout goes into some of these details that should point you in the right direction. But it was for adding new fields to order_extras not related to calculations so I don't think this is the right way to go.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote