PHPackages                             pixelperfectat/magento2-module-checkout-discount-display - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pixelperfectat/magento2-module-checkout-discount-display

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

pixelperfectat/magento2-module-checkout-discount-display
========================================================

Per-item discount messages and strikethrough pricing in the cart

342PHP

Since Jul 3Pushed 4mo agoCompare

[ Source](https://github.com/pixelperfectat/magento2-module-checkout-discount-display)[ Packagist](https://packagist.org/packages/pixelperfectat/magento2-module-checkout-discount-display)[ RSS](/packages/pixelperfectat-magento2-module-checkout-discount-display/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

PixelPerfect Checkout Discount Display
======================================

[](#pixelperfect-checkout-discount-display)

Per-item discount messages and strikethrough pricing for Magento 2 carts.

Features
--------

[](#features)

- **Strikethrough pricing** — regular catalog price crossed out next to the discounted price on cart line items
- **Discount exclusion messages** — explains why an item was excluded from a coupon or why only a partial discount was applied
- **Coupon discount messages** — shows the coupon discount amount per item
- **Affiliate discount messages** — shows affiliate-specific discount amounts (requires Amasty Affiliate)
- **Cart drawer support** — adds price data to customer section data for FPC-compatible cart drawers
- **GraphQL support** — extends `CartItemPrices` with `regular_price`, `has_discount`, and `discount_messages` fields
- **Multi-store** — all features configurable per store view
- **Translations** — included for `en_US`, `de_DE`, `it_IT`, `fr_FR`, `es_ES`

Requirements
------------

[](#requirements)

- PHP 8.3+
- Magento 2.4.7+
- [pixelperfectat/magento2-module-discount-exclusion](https://packagist.org/packages/pixelperfectat/magento2-module-discount-exclusion)

### Optional

[](#optional)

- **Hyvä Theme** — required for cart page strikethrough pricing template
- **Amasty Affiliate** — enables affiliate discount detection and messaging

Installation
------------

[](#installation)

```
composer require pixelperfectat/magento2-module-checkout-discount-display
bin/magento module:enable PixelPerfect_CheckoutDiscountDisplay
bin/magento setup:upgrade
```

Configuration
-------------

[](#configuration)

**Stores &gt; Configuration &gt; Sales &gt; Checkout Discount Display &gt; General**

SettingDescriptionDefaultEnable Discount MessagesShow per-item messages for exclusions, coupons, and affiliate discountsYesEnable Strikethrough PricingShow regular price crossed out next to discounted priceYesBoth settings are configurable at the default, website, and store view level.

GraphQL
-------

[](#graphql)

The module extends the `CartItemPrices` type:

```
{
  cart(cart_id: "...") {
    items {
      prices {
        regular_price {
          value
          currency
        }
        has_discount
        discount_messages
      }
    }
  }
}
```

How It Works
------------

[](#how-it-works)

1. An observer on `sales_quote_collect_totals_after` iterates visible cart items and attaches discount messages via `AbstractItem::addMessage()`
2. Messages are recalculated on every `collectTotals()` call — no persistent storage needed
3. A plugin on `Magento\Checkout\CustomerData\AbstractItem::getItemData()` adds `regular_price`, `regular_price_formatted`, and `has_discount` to section data for the cart drawer
4. The Hyvä template override renders strikethrough pricing when the regular price differs from the final price

License
-------

[](#license)

MIT

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance51

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9df00e858fe20fc93f406cf4ec649ed6a2c91aac6f021047b2ec273ad465e3b7?d=identicon)[pixelhed](/maintainers/pixelhed)

---

Top Contributors

[![pixelhed](https://avatars.githubusercontent.com/u/1169770?v=4)](https://github.com/pixelhed "pixelhed (27 commits)")

### Embed Badge

![Health badge](/badges/pixelperfectat-magento2-module-checkout-discount-display/health.svg)

```
[![Health](https://phpackages.com/badges/pixelperfectat-magento2-module-checkout-discount-display/health.svg)](https://phpackages.com/packages/pixelperfectat-magento2-module-checkout-discount-display)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
