I am using Event Espresso and I want seats to be colored based on their prices. I have found no option in settings for color. Please suggest me how can I make it possible.
Currently this isn’t available within the Seating Chart but with a small edit you can add a class to each of the seats which which will allow you to set the color using CSS.
You would need to apply custom styles for each colour you wanted to highlight.
Within the seating chart add on you will need to open the file \espresso-seating\request.php
On line 129 you will find:
Edit – the forum editor is formatting the code block and removing sections of code, I have added the code here:
Which is the line that outputs the contining div for each seat, add this:
Before the closing “.
View the pastebin above for an example.
That will apply a class of .ee_s_seat_price-*seat price* to each seat.
So then say you wanted every seat that cost $30 to be hotpink, you could apply a custom style such as this:
.ee_s_seat_price-30 {
background: #FF69B4;
}
Which will set that seats background to #FF69B4, like this – http://take.ms/GxVm9
Note this modification will be lost on each EE Seating Chart update, however, as this change has very minimal inpact I will include this as a feature request for future versions. There may be changes to how this works, or the classes used, if this is included within the seating chart.
After working through the above, I realised we already have a ‘price’ attribute within the div, so no modifications are needed for this after all.
You can simply add some custom CSS like this:
.ee_s_seat[price="30"] {
background: #FF69B4;
}
which would have the same effect as above, without the need to modify the seating chart at all. With the code above any seat with a price of 30 will be styled hot pink.
The support post ‘Is there any way to color the seats based on price in seating charts?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.