mateuszmarkowski / jQuery-Seat-Charts

jQuery Seat Charts Plugin
MIT License
596 stars 209 forks source link

Individual seat pricing #88

Open danhutch88 opened 1 year ago

danhutch88 commented 1 year ago

Any suggestions on how to assign an individual price per seat, rather than using letter groups?

It's for airplane seat selection, each seat could have a unique price. My understanding of the repo so far means I'm limited to 52 individual prices (Upper and lower case single letters of the alphabet).

Thanks in advance.

mateuszmarkowski commented 1 year ago

The click handler gives you access to the ID of the seat that was clicked. Seat IDs are unique and generated automatically but you can override the method generating them to use your internal IDs. See the getId method in the documentation.

Once you have the ID you can pull the price from any external source like e.g. hash or even make an http call to grab it from your server. See the highlighted snippet from the live demo: image