I have one content type Restaurant. For each restaurant, I would like to record their menu.
The sample data would look like this:
Beverages
Cocktail
Blue Lagoon $9.99
(X combined with Y etc)
Red Sapphire $9.99
(Another X mixed with blah)
Pasta
Classic Bolognaise $13.69
(Pasta of your choice mixed with our home-made specialties bolognaise sauce)
As you can see,the menu consisted of several components: categories, menu name, description, price. It would also be great if we could also rearrange categories (Some restaurants might prefer their beverages to be displayed before their maincourse, while other prefer the opposite).
RESTAURANT content type. Fields for business name, business address, phone, fax, website, email, IM, twitter, business owner, business contact (like manager), restaurant description, logo, and google map location link (or implement location and gmap modules) etc. Maybe use five-star module to enable user ratings of the restaurants.
FOOD hiearchical taxonomy (need module for this). Food categories are beverages (alcoholic, non-alcoholic, etc), soups, salads, breakfasts, lunch, dinner, desserts, entrees, sandwiches, seafood, etc.
FOOD content type. Fields for node reference field to the RESTAURANT name so their menu gets built and organized correctly, FOOD hiearchical taxonomy selection, food title (McRib, Whopper, Bloomin Onion, etc.), price, preparation options (medium, well-done, etc.), food image(s), and additions which can be combined with this dish should either be select list options or node references to other food content types (mashed or baked potatoes with that?)
Regarding images, use imagecache to generate several different useful sizes of all pics, so you can tiny thumbnails, medium sized images, and full sized gorgeous pics of the dishes.
Display on CSS that looks somewhat like a menau. Look at national restaurant websites like Chilis.com to see how they do it. Provide menu links of the food taxonomy terms for each restaurant, and a view of restaurants with exposed filters so users can easily find restaurants by type, location, star rating, etc.
Sounds like a fun project. I'd like to see a case study published when you're finished.
The way I would do it would probably be like this:
Note, I'm used to developing Drupal, so I would be able to do a lot of these things pretty fast, since I done sometime similar recently. This might not be the best choice for you.
This is a bit developer heavy, as a lot of these things would need to be coded. You could go a very far way just using cck and views, but I would rather create a module for this. The reason is that if the client would want this changed in half a year or come with additional features, I might get a very hard time implementing it. Integrating with cck and views can be very tricky and time consuming, so using a little extra time now, would make it a lot more flexible and extendable. I have also done different things that have some common grounds, so I would be able to C/P a lot of code, that I know well, and just adjust it here and there for some of this stuff. That's also partly the reason for me going this route, as using cck and views alone wouldn't be saving me that much time anyways
i had to do something very similar to this. i solved it with panels, views and cck. i created a node type 'restaurant' and a node type 'menu_item'. the menu_item taxonomy is set by using an specific vocabulary. i used panels to display the menu for paths restaurant-name/menu, then views+cck to show the items in the menu (i used node referrences to link items to restaurants). then i grouped the view by taxonomy:term field.
The first idea I had to do this could be something as follows:
This way, you can store your data.
For the displaying part, you could use:
I recommend the first choice since it is more standards-compliant, quicker in execution and could avoid some possible problems that could come from the views+block way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With