X
23966

Ticket #23966 Public

Happy Hour/Lunch pricing, tabbed menu meal type filter

We needed the ability to add specific pricing for happy hour, lunch, and new years special menus. As FoodPress didn’t seem to support this, I looked into what was needed to make that possible.

Ashan did all the hard work with the lower level functions, so I was able to tweak a few lines of code in /plugins/foodpress/includes/class-menus.php to make it work. Now I only need to add an additional parameter to my menu short code, and populate that custom variable across all the lunch and happy hour menu items, e.g. price_field=”fp_price_lunch”:
[add_foodpress_menu box_width=”100″ wordcount=”99999″ ux=”none” menu_type=”ss_2″ cat_sty=”tb” primary=”dish_type” dish_type=”591,639,640,641,642,643,644,645,646,647,648,649″ dt_des=”yes” orderby=”date” secondary=”588″ price_field=”fp_price_lunch”]

You’ll notice there’s another new parameter I added in: secondary=”588″. That parameter is a meal type ID filter that I use to show only dinner items (or lunch or happy hour or …) within a tabbed menu. FoodPress can’t inherently do that, either.

I managed both of these changes by changing a total of about 6 lines of the code.

Ashan, I would be happy to share that code with you to consider migrating into the release version.  Let me know where I can upload the modified class-menus.php file, or where I can email it.

Your forethought in your lower level functions made these changes a snap.

BY: Cameron Knowlton - Jan 18,2017 AT 12:50PM - 3 years ago
You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON