Explore adding conditions to price list items

Created on 23 January 2018, almost 7 years ago
Updated 4 December 2024, 18 days ago

Following up the data structure work in #2368053: Reboot the Drupal 8 port , @bojanz would like to add conditions to the price list level.

We will first need to define what conditions are needed, then hopefully we can borrow some code from commerce_promotion.

📌 Task
Status

Postponed

Version

2.0

Component

Code

Created by

🇨🇳China skyredwang Shanghai

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium RandalV

    I was looking for this functionality as well.
    We have a website that has pricelists 'linked' to a value on the user entity.

    We import our pricelists from an ERP, and we've worked around this issue by hooking onto the user & pricelist insert/update events.

    Pricelist on insert/update:
    - Find all users with the custom value and attach them to the customers field
    User on insert/update:
    - Remove the user from pricelist(s) with the old value (if applicable) and add to pricelist(s) with the new value

    The main problem here is that, if no users have the value of that pricelist, the pricelist applies to EVERY user. That's something that conditions would have easily solved.
    In our use case, we've solved this by creating a 'dummy' user and if no other users apply for the pricelist, we attach the 'dummy' user to the pricelist.

    Configuration/development wise this would have been much faster and cleaner if we had conditions, but I understand the argument of speed is a factor here too.
    I'll set this as postponed, it's not and hasn't been really an active issue and if the need arises later on it can be reopened.

Production build 0.71.5 2024