Package and Booking
Description / Background
For all-you-can-eat packages, you pay 1 package for 1 person and can eat whatever you want (for selected items on the package menu details) within the time limit that the restaurant sets from your arrival time. AYCE packages are only available for dine-in.
You can add, search, edit, and delete AYCE packages on the admin dashboard https://hungryhub.com/admin/packages/ayces?locale=th.
On the admin dashboard you can customize the package, and you can adjust which restaurant uses the package. On edit package you can check whether the package is active or not.
For party pack packages, 1 package can be enjoyed by more than 1 person; the menu lets you choose whatever you want with an amount limit. Some packages offer 5 set menus per person.
You can add, search, edit, and delete party pack packages on the admin dashboard https://hungryhub.com/admin/packages/party_packs?locale=th.
On the admin dashboard you can customize the package, and you can adjust which restaurant uses the package. On edit package you can check whether the package is active or not.
This package contains Dining menu with Hotel room. Every xperience package use pricing per pack.
H@H its package that customer can buy and enjoy it at home, it contains delivery service. H@H only availabe for prepaid so customer have to pay the bill before the reservation was confirmed by restaurant, after confirmed system will try to get delivery service. Right now we have 2 couriers:
- Lalamove
- Grab
For the H@H delivery, we calculate the distance between the restaurant and the customer using the Google API service or Lalamove service. We then calculate the delivery fee based on the distance.
For distance calculation, see app/my_lib/delivery_channel/distance_calculator.rb and for delivery fee calculation, see app/my_lib/hh_package/reservation_packages/charge_calculator.rb.
Package Comparison
Dine In
| Category Comparison | All You Can Eat | Xperience | Party Packs | Buffet Plus | Hungry Lunch | Hungry At Home |
|---|---|---|---|---|---|---|
| Pricing Plans | many prices | one price | one price | one price | one price | one price |
| Pricing Model | per person | per pack | for X people (on 1 pack) | per person | per set (usually for 1 person) | per set |
| no need to show time | divided into 2 categories |
Hungry@Home
| Category Comparison | Delivery | Self Pick Up |
|---|---|---|
| Delivery package | the reservation was delivery to customer house | customer have to pick up the reservation on the restaurant by them self |
| address | need delivery address | they didn’t need delivery address |
| payment | they must be prepaid | must prepaid |
Glossary
N/A
Objectives
N/A
Location
Admin dashboard packages section.
How to find Package and Booking
Navigate to Admin Dashboard > Packages.
How to set Package
N/A
Package behavior
N/A
Sequence Diagram / Flow
N/A
ERD
N/A
Backend Implementation
N/A
Frontend Implementation
N/A
Design
API Blueprint
Pricing Type in Package
Pricing type
Usually we get the value from pricing_type_sym or pricing_type attribute , we have 3 types of pricing types :
- per_pack
- per_person
- per_set Each pricing type has different rules and mechanisms for determining price and how to order the packages, below is a list of packages and each pricing type
| Package name | Type code | Pricing type symbol |
|---|---|---|
| Party pack | pp | per_pack |
| Xperience | xp | per_pack |
| All You Can Eat | ayce | per_person |
| Hungry@home | hah | per_set |
Rules Object :
| Attribute | Data Type |
|---|---|
| duration | number |
| kids_price_rate | number |
| max_seat | number |
| min_seat | number |
| per_pack | number |
| price | string |
| price_description | string |
How to Calculate Price for each pricing type
1. Per person
This type can only select one package and cannot combined even with the same type_code package, the calculation is based on the party size quantity. There are 3 cases how to calculate the price
- Adult price = uses the last array
rules.priceattribute value - Kids Price = get higest kids price in array
kids_price_v2.price_value
- Adult only total price = adult price * adult quantity example :
| qty | price | total | |
|---|---|---|---|
| adult | 2 | 400 | 800 |
| total price | 800 |
- Adult + kid with no kids price (use_kids_price = false)
total price = ( adult quantity * adult price ) + (kids quantity * adult price)
example :
| qty | price | total | |
|---|---|---|---|
| adult | 2 | 500 | 1000 |
| kid | 2 | 500 | 1000 |
| total price | 2000 |
- Adult + kid with kids price (use_kids_price = true)
total price = ( adult quantity * adult price ) + (kids quantity * kids price)
example :
| qty | price | total | |
|---|---|---|---|
| adult | 1 | 500 | 500 |
| kid | 2 | 200 | 400 |
| Total Price | 900 |
2. Per Pack
Can select more than one package with the same type_code , different from per_person the calculation is based on package quantity not party size quantity
package price = uses the last array rules.price attribute value
total price = =sum(package price * package quantity)
example :
| qty | price | total | |
|---|---|---|---|
| party pack a | 2 | 200 | 400 |
| party pack b | 2 | 100 | 200 |
| party pack c | 2 | 50 | 100 |
| total price | 700 |
3. Per Set
Can select more than one package with the same type_code , the calculation is based on package menu
package price = uses the last array rules.price attribute value
total price = =sum(package price * package quantity ) + delivery Price
example :
| qty | price | total | |
|---|---|---|---|
| menu 1 | 1 | 250 | 250 |
| menu 2 | 2 | 100 | 200 |
| delivery fee | 10 | ||
| Total price | 460 |