AI Reports

Guides › Database reference › Carts

Magento 2 quote_item table

The products in each cart. Like order items, configurable and bundle products have a parent row plus child rows.

Key columns

ColumnWhat it means
item_idInternal ID of the cart line.
quote_idThe cart, linking to quote.entity_id.
parent_item_idNULL for top-level lines; set on the chosen variant of a configurable product.
product_id / sku / nameThe product in the cart.
qtyQuantity in the cart.
price / row_totalUnit price and line total.

Good to know

Example: Products most often sitting in active carts

Works on Magento Open Source and Adobe Commerce.

SELECT qi.sku, MAX(qi.name) AS name, COUNT(DISTINCT qi.quote_id) AS carts, SUM(qi.qty) AS qty
FROM quote_item qi
JOIN quote q ON q.entity_id = qi.quote_id AND q.is_active = 1
WHERE qi.parent_item_id IS NULL
GROUP BY qi.sku
ORDER BY carts DESC
LIMIT 20;

Tested on Magento Open Source and Adobe Commerce 2.4.8. Read-only. If your tables have a prefix, add it to each table name.

Extra columns on Adobe Commerce

Adobe Commerce has 60 columns here instead of 53. The extra ones come from these Commerce features:

Foreign keys

All 53 columns (Magento Open Source)

Show all columns
ColumnTypeCan be emptyMagento's description
item_idint(10) unsignedItem ID
quote_idint(10) unsignedQuote ID
created_attimestampCreated At
updated_attimestampUpdated At
product_idint(10) unsignedyesProduct ID
store_idsmallint(5) unsignedyesStore ID
parent_item_idint(10) unsignedyesParent Item ID
is_virtualsmallint(5) unsignedyesIs Virtual
skuvarchar(255)yesSku
namevarchar(255)yesName
descriptiontextyesDescription
applied_rule_idstextyesApplied Rule Ids
additional_datatextyesAdditional Data
is_qty_decimalsmallint(5) unsignedyesIs Qty Decimal
no_discountsmallint(5) unsignedyesNo Discount
weightdecimal(12,4)yesWeight
qtydecimal(12,4)Qty
pricedecimal(20,4)Price
base_pricedecimal(20,4)Base Price
custom_pricedecimal(20,4)yesCustom Price
discount_percentdecimal(12,4)yesDiscount Percent
discount_amountdecimal(20,4)yesDiscount Amount
base_discount_amountdecimal(20,4)yesBase Discount Amount
tax_percentdecimal(12,4)yesTax Percent
tax_amountdecimal(20,4)yesTax Amount
base_tax_amountdecimal(20,4)yesBase Tax Amount
row_totaldecimal(20,4)Row Total
base_row_totaldecimal(20,4)Base Row Total
row_total_with_discountdecimal(20,4)yesRow Total With Discount
row_weightdecimal(12,4)yesRow Weight
product_typevarchar(255)yesProduct Type
base_tax_before_discountdecimal(20,4)yesBase Tax Before Discount
tax_before_discountdecimal(20,4)yesTax Before Discount
original_custom_pricedecimal(20,4)yesOriginal Custom Price
redirect_urlvarchar(255)yesRedirect Url
base_costdecimal(12,4)yesBase Cost
price_incl_taxdecimal(20,4)yesPrice Incl Tax
base_price_incl_taxdecimal(20,4)yesBase Price Incl Tax
row_total_incl_taxdecimal(20,4)yesRow Total Incl Tax
base_row_total_incl_taxdecimal(20,4)yesBase Row Total Incl Tax
discount_tax_compensation_amountdecimal(20,4)yesDiscount Tax Compensation Amount
base_discount_tax_compensation_amountdecimal(20,4)yesBase Discount Tax Compensation Amount
weee_tax_appliedtextyesWeee Tax Applied
weee_tax_applied_amountdecimal(12,4)yesWeee Tax Applied Amount
weee_tax_applied_row_amountdecimal(12,4)yesWeee Tax Applied Row Amount
weee_tax_dispositiondecimal(12,4)yesWeee Tax Disposition
weee_tax_row_dispositiondecimal(12,4)yesWeee Tax Row Disposition
base_weee_tax_applied_amountdecimal(12,4)yesBase Weee Tax Applied Amount
base_weee_tax_applied_row_amntdecimal(12,4)yesBase Weee Tax Applied Row Amnt
base_weee_tax_dispositiondecimal(12,4)yesBase Weee Tax Disposition
base_weee_tax_row_dispositiondecimal(12,4)yesBase Weee Tax Row Disposition
gift_message_idint(11)yesGift Message ID
free_shippingsmallint(5) unsignedFree Shipping

Related tables

Gaurav Harsh

Gaurav Harsh is a Magento developer who works on large Adobe Commerce stores and builds AI Reports, a Magento extension for asking your store's data questions in plain English. LinkedIn