Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Package and Booking

Description / Background

For all you can eat package, you can pay 1 package for 1 person, and you can eat whatever you want(for selected items on package menu details) with the time limits that restaurant already decides from your arrival. And ayce package only available for dine in. You can add, search, edit, and delete Ayce package on admin dashboard https://hungryhub.com/admin/packages/ayces?locale=th on the admin dashboard you can custom the package, and you can ajust which restaurant that use the package on edit package you can check the package active or not.

For party pack package 1 package can be enjoyed for more than 1 person, the menu you can choose whaterver you want with amount limit, some package offers 5 set menu per person. You can add, search, edit, and delete Ayce package on admin dashboard https://hhstaging.hungryhub.com/admin/packages/party_packs?locale=th on the admin dashboard you can custom the package, and you can ajust which restaurant that use the package on edit package you can check the package 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 courries: Lalamove and Grab On the H@H we hava to calculate distance between restaurant and customer using Goole API service or using Lalamove service. And we have to calculate the delivery fee after knowing the distance. For distance calculation you can find on app/my_lib/delivery_channel/distance_calculator.rb and you can find the calculation for delivery fee on app/my_lib/hh_package/reservation_packages/charge_calculator.rb

Package Comparison

Dine In

Category ComparisonAll You Can EatXperienceParty PacksBuffet PlusHungry LunchHungry At Home
Pricing Plansmany pricesone priceone priceone priceone priceone price
Pricing Modelper personper packfor X people (on 1 pack)per personper set (usually for 1 person)per set
no need to show timedivided into 2 categories

Hungry@Home

Category ComparisonDeliverySelf Pick Up
Delivery packagethe reservation was delivery to customer housecustomer have to pick up the reservation on the restaurant by them self
addressneed delivery addressthey didn’t need delivery address
paymentthey must be prepaidmust prepaid

Glossary

Objectives

Location

How to find Package and Booking

How to set Package

Package behavior

Sequence Diagram / Flow

ERD

Backend Implementation

Frontend Implementation

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 :

  1. per_pack
  2. per_person
  3. 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 nameType codePricing type symbol
Party packppper_pack
Xperiencexpper_pack
All You Can Eatayceper_person
Hungry@homehahper_set

Rules Object :

AttributeData Type
durationnumber
kids_price_ratenumber
max_seatnumber
min_seatnumber
per_packnumber
pricestring
price_descriptionstring

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.price attribute value
  • Kids Price = get higest kids price in array kids_price_v2.price_value
  1. Adult only total price = adult price * adult quantity example :
qtypricetotal
adult2400800
total price800
  1. Adult + kid with no kids price (use_kids_price = false)

total price = ( adult quantity * adult price ) + (kids quantity * adult price)

example :

qtypricetotal
adult25001000
kid25001000
total price2000
  1. Adult + kid with kids price (use_kids_price = true)

total price = ( adult quantity * adult price ) + (kids quantity * kids price)

example :

qtypricetotal
adult1500500
kid2200400
Total Price900

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 :

qtypricetotal
party pack a2200400
party pack b2100200
party pack c250100
total price700

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 :

qtypricetotal
menu 11250250
menu 22100200
delivery fee10
Total price460