0

i have a view with items and prices, each item has an id, another view taken from a different content type also shows items and their base price the id of the item will be the same (basically one list is items containing seller prices and another is the market price, there can be many sellers but only one market price).

now i want to show in the first view a calculated field that will display the difference between the seller price (price of an item in first view) and the market price (the price of the item containing the same id in the second list).

is there a way to do it? if so how?

1 Answer 1

0

One way to do this would be to create a field template for that specific field. Then you could first print the value of the seller price, and then do the calculations in php and print the difference.

You can specify that the field template only be used for a specific field in a specific display of a specific view by naming it correctly. You'll find the pertinent names in your view edit page under Advanced -> OTHER -> Theme: Information. The default contents of a template file are also available there by clicking on the field name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.