Add Promotion Price to Product Variations

Created on 2 August 2024, 4 months ago

Problem/Motivation

I can't seem to get product variation prices with any discounts applied

Proposed resolution

Add a new field to the product variations called promotion_price or calculated_price?

Is this something that you would be open to adding? I am using a custom module at the moment and would not be too hard to make a PR for this module as others may benefit from having it?

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom chrisscrumping

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

Comments & Activities

  • Issue created by @chrisscrumping
  • 🇮🇱Israel jsacksick

    Oh do you mean the equivalent of the "Calculated" price formatter?

  • 🇬🇧United Kingdom chrisscrumping

    Yeah exactly, the price with promotions etc applied

  • 🇮🇳India shabana.navas

    Any momentum on this? We're looking to add the same to take into account taxes. So, something like a new calculated price field where the user can configure on a settings page which adjustment types they want to be added to the calculated price, similar to how we're doing it on the Manage Display for each variation type ie:

    Apply fees to the calculated price
    Apply promotions to the calculated price
    Apply taxes to the calculated price
    Apply shipping costs to the calculated price
    Apply shipping promotions to the calculated price

  • 🇬🇧United Kingdom chrisscrumping

    I ended up switching out the JSON:API and this module and using my own endpoint as I only really needed a few bits of data and JSON:API was overkill in my case.

  • 🇮🇳India shabana.navas

    @chrisscrumping I see, thanks. In that case, I think we will work on creating a new patch that adds the `calculated_price` field similar to how we currently have the `resolved_price` field in the module.

  • 🇮🇳India shabana.navas

    Adding patch that creates a `calculated_price` field similar to the `resolved_price`. A new Settings Form has been created that gives admins the option to select which adjustment types to include in the Calculated Price that will be displayed in the API response.

    Still need to add tests.

Production build 0.71.5 2024