I am trying the help a local restaurant by putting up a simple website for ordering take-away.
I want to leverage LiveView to show the current order items on the right hand side.
I need to have a cookie based solution that preserves the order items when clicking on links (sub-menus for starters, mains, desserts, etc).
So far I have not been able to make it work and I have not been able to find any solutions/hints online.
I have tried using the _csrf_token, but it is not always present in the session.
I want to avoid forcing the customer to create a login - just have them state a mail/cell number so that the restaurant can tell when their order is ready. Everything is paid for at pick-up, no online payment (I’m just doing this as a favour to the local restaurant, so not going to open that box of goodies).
I have found several authentication related solutions for LiveView, but that is not the use case I’m after.
As far as I can tell it would be possible to control this better using straight Phoenix as the problem is related to the use of websockets in LiveView. I just fancy the idea of a live update of the current order in the style of LiveView. If it is impossible I will just revert to “plain” Phoenix, but that feels like an unnecessary defeat.
I am not an expert in Phoenix (LiveView) so please forgive me for my ignorance.
I hope that I have explained the problem well enough.