Skip to main content

16 posts tagged with "Magento Tutorials"

View All Tags

How to fetch the row total (and unit total), including the discount in Magento 2

· 3 min read

Magento database structure can be very complex. This high complexity is especially true for the sales_order tables. These tables contain many columns with different numerical values, so fetching the data you need can be challenging.

In this article, we will show how to fetch the row total and the unit total, including discount, including or excluding tax, from the sales_order_item table in the Magento 2 database. We will show how to do that using an SQL query or programmatically.