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

1.0.0(1mo ago)4461[2 issues](https://github.com/pixelperfectat/magento2-module-checkout-discount-display/issues)MITPHPPHP ^8.3CI passing

Since Jul 6Pushed 1mo 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 1w ago

READMEChangelogDependencies (7)Versions (4)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](LICENSE)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance81

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

42d ago

### 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 (38 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### 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)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1142.0M17](/packages/mollie-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32426.0k8](/packages/buckaroo-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50406.2k23](/packages/dotdigital-dotdigital-magento2-extension)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1015.1k29](/packages/loki-magento2-components)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

69362.0k](/packages/run-as-root-magento2-prometheus-exporter)[joseph-leedy/module-custom-fees

Adds configurable custom fees to orders

351.5k](/packages/joseph-leedy-module-custom-fees)

PHPackages © 2026

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