Pricing uplift on Variants based on Product Attribute Option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • enable.services
    Junior Member
    • Apr 2025
    • 2

    Pricing uplift on Variants based on Product Attribute Option

    We would like to increase list price by an amount we can define on each product attribute option. An example: we sell pre-painted stools, and most colours are free, but silver and gold paint has an additional charge. When variants are generated, we would like the list price of the variant to include the additional charge (we can do this with a formula but we can't by default add the currency field to the Product Attribute Option entity in the entity manager).

    If not considered for the core add-on, we would like to be able to add custom fields to Product Attribute Option entity. We can then use the Before Save Script to add the template list price to a value in a custom field on Product Attribute Option and set in the variant's list price.

    Note that I understand we can in code add fields to the Product Attribute Option entity, but it is not clear why it isn't already made available in the UI's Entity Manager and we do not want to risk breakages in the future.



  • yuri
    Member
    • Mar 2014
    • 8845

    #2
    It's not available for customization to make it easier for the product developers to develop. Every customization ability adds a maintenance burden. If we going to extend or change some feature in future, we need to consider possible customizations done by users. By making certain entity types not customizable, it reduces chances that something will break. Customization abilities impede future development.

    The Product Attribute is an entity type that is considered as such that needs to be customized very rarely. It has quite a specific logic.

    It is possible to add a custom field manually. It should be added to entityDefs metadata. Then added it to the detail layout.
    Last edited by yuri; 04-08-2025, 10:36 AM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • enable.services
      Junior Member
      • Apr 2025
      • 2

      #3
      Thank you, we understand the subtlety here. Extensive customisations to entities which are part of a package is risky, but small changes such as one or two additional fields are likely to be safe and can be added in the metadata. I appreciate the assistance.

      Comment

      Working...