Show bundle saving on product

Created on 22 February 2024, 4 months ago
Updated 23 February 2024, 4 months ago

I have a situation where I am referencing a bundle variation product in a normal node.

I'm using add to cart link rather than add to cart form because it gives me granular control of how it's styled.

I need to display the bundle saving on the node where the add to cart link is being displayed.

I can display the price in twig using something like {{ product_variation.getPrice()|commerce_price_format }} and it would be useful to have something like {{ product_variation.getSavingAmpount()|commerce_price_format }}

Would it be acceptable to add functions like that be added to VariationBundle Class ?

Cheers Dan

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom danharper

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024