pixelperfectat / magento2-module-discount-lines-hyva-checkout
Hyvä Checkout renderer for the Discount Lines module: one price summary line per discount
Package info
github.com/pixelperfectat/magento2-module-discount-lines-hyva-checkout
Language:HTML
Type:magento2-module
pkg:composer/pixelperfectat/magento2-module-discount-lines-hyva-checkout
Requires
- php: ^8.3
- magento/framework: ^103.0
- pixelperfectat/magento2-module-discount-lines: ^1.0
Requires (Dev)
- phpunit/phpunit: ^9.6
- pixelperfectat/coding-standard: ^0.2.1
Suggests
- hyva-themes/magento2-hyva-checkout: Hyvä Checkout (commercial) provides the price summary this module renders into
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-01 15:41:33 UTC
README
Renders one price summary line per discount (coupon, automatic rule, gift, free shipping) in
Hyvä Checkout, using the data and display variant (A to D) provided by
pixelperfectat/magento2-module-discount-lines.
Requirements
pixelperfectat/magento2-module-discount-lines- Hyvä Checkout (commercial licence, not installed by this package)
Installation
composer require pixelperfectat/magento2-module-discount-lines-hyva-checkout bin/magento setup:upgrade
How it works
- Replaces the template of the
price-summary.total-segment.discountblock. Without itemised lines (module disabled, or a quote without stored lines) the original Hyvä Checkout markup is rendered. - Loads the base stylesheet
PixelPerfect_DiscountLines::css/discount-lines.css. Colours come from the CSS custom properties--pp-dl-chip-bg,--pp-dl-chip-ink,--pp-dl-auto-bg,--pp-dl-auto-inkand--pp-dl-save; override them on:rootin your theme. - The remove button on a coupon chip calls
revokeCouponCodeon Hyvä Checkout's owncoupon-codeMagewire component, so the price summary refreshes as usual. The button is hidden when the discount code component is disabled in the Hyvä Checkout configuration.
Variants
Set under Stores > Configuration > Sales > Discount Lines: A (label with chip below), B (chip as the label, default), C (grouped block with "You save" total), D (quiet icon and monospace).
Configuration
Configured in the base package under Stores > Configuration > Sales > Discount Lines (store-view scope):
pp_discount_lines/general/enabled (default 1) and pp_discount_lines/display/variant (A to D, default B).
See the base README for the full table.
Contract
The data this package renders (extension_attributes.discount_lines, row data key discount_line, the label rule
and the line kinds) is described in the
contract section of the base README.
Known limits
- Orders placed before the base module was installed keep the merged core row.
- Existing carts show the core row until the next totals collect.
- The Hyvä Checkout
discountsegment template is replaced; customisations of it must target the replaced block. - Without itemised lines (module disabled, or a quote without stored lines) the original Hyvä Checkout markup is rendered.
- See the base README for the complete list of known limits.
Screenshots
Placeholder data only, in docs/screenshots/:
Development
composer install composer check
License
MIT, see LICENSE.