Jump to content

Payment fees in order object missing?


Recommended Posts

Hi there,

Working on a module with similar functionality to Google Analytics with e-commerce data. The module is required to send the order with details via JS API to a system. The issue is that it is required to send data separately for totals on ordered items, taxes, shipping charges and payment fees.

I can get all above from the order class except the payment fees. I looked on a free module that provides COD with fees on how this is implemented and I found that the fee is either added into the shipping charges or is added as a separate product in the order.

According to my findings, the payment fees information is missing from the order class. Any clues or suggestions would be very welcome.

Link to comment
Share on other sites

  • 1 year later...

If COD fee in extra module is added as separate product.. Just simply read products in order like this

$order = new Order($idNumber);
$orderItems = $order->getCartProducts();
foreach ($orderItems as $key => $orderItem) {
	$itemPriceWithoutTax = $orderItem['price'];
}

And that COD item/product will be in this list ;)

Edited by Inter Svetainė
grammar (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...