Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to make a View where I can see the tourist tax that we have to pay. For such a View I would need a field that contains the number of nights that someone spens in our accommodation. Such a field must be there since other wise the price could not be calculated. But in Views I see no way to access it. Please shed some light here.
Comments
Comment #1
stevep CreditAttribution: stevep commentedlooking through the field list (admin/reports/fields), it appears the number of nights is not a field, as such. I'm not a programmer, but I would expect it's a variable that gets passed to the line item (commerce order).
Have you looked at Views Variable Field , which is sponsored by Bluespark Labs?
"This module provides a "Views Variable Field" handler to display a system variable as a field in a view"
Comment #2
TheoRichel CreditAttribution: TheoRichel commentedThank you. I have installed the module and the Global System Variable is there, but how do I know what to choose as 'system variable'?
Comment #3
stevep CreditAttribution: stevep commentedTheo
I had a quick look at the module, but didn't make much progress. Hopefully someone with better understanding will comment/advise.