I would like to be able to create a field that is visible when I do a search (such as a price) that is the result of a math computation between two fields of a registered user (or two default fields if the user is not registered). How can I create this virtual field so it is orderable (maybe as a default sort). Which files should I edit?
Thank you all.
Could you create this as two attributes? Then you can import the two fields when you update the price column meaning that they become static rather than dynamic. You can add both of these to be possible to be sorted by.
Then your customisation just becomes hiding one of these based on if the customer is logged in or not.