Come More Pay Less for Party Pack
Description / Background
Adding come more pay less promotion for party pack package
Glossary
Private (https://app.clickup.com/9003122396/docs/8ca1fpw-35796/8ca1fpw-41516)
Objectives
- User can get come more pay less promotion on PP package
- System will calculate the package price by quantity of the package
Example:
If user books 5 packages, it will be considered as user buying 4 packages.
- Add checklist come more pay less on edit PP package
- The label would be Get More Pay Less for party pack
- AYCE package label: "Come more pay less" / "Come 4 pay 3"
- Party Pack package label: "Get more pay less" / "Get 5 pay 3"
- The person icon will be replaced with pax text for party pack

- Admin can set the PP package as come more pay less
Scope
All of the booking flow
- Cart page
- Checkout page
- Store page
- Booking confirmation (Email, App and Web)
- Edit booking
- Admin dashboard and partner portal
- Booking list
- Billing
- Report
- Export pdf and excel
Sequence Diagram / Flow
ERD
Backend Implementation
- The promo label for group pricing was hardcoded as "Come more pay less" and the dynamic message (e.g., "Come 4 pay 3") was similarly hardcoded.
- The label and message are now dynamically generated based on the package type (e.g., AYCE, Party Pack).
- Instead of hardcoded strings, the code determines the package type, fetches a short identifier (like
ayce,pp), and uses it to look up the correct label and message from the locale files. - Each package class now defines a
TYPE_SHORTconstant (e.g.,'ayce','pp', etc.). - The code uses
safe_constantizeto turn the string name of a class into a class object, safely. - The
TYPE_SHORTis then used to fetch the appropriate translation string for both labels and dynamic messages. - Replaces the hardcoded promo text with a lookup in the locale file using the package type’s
TYPE_SHORT. - Replaces the hardcoded promo text with a lookup in the locale file using the package type’s
TYPE_SHORT. - Adds a
come_pay_labelmethod that returns the correct promo label for the package type. - Passes the package type through to methods that generate promo labels.
- Adds a
come_pay_labelhelper that uses localization for the given package type. - The dynamic promo title is now generated via the locale using the package type, replacing the static "Come X Pay Y".
- Replaces the static "Come more pay less" with the dynamically generated label using the new helper methods and localization.
- Ensures that both the label and the dynamic message are localized and package-type aware.
- Adds new translation keys for promo labels and dynamic messages under
promo.come_pay_lessandpromo.come_pay_less_dynamic. - English and Thai versions for each package type are provided
- The method
dynamic_price_comemore_payless?is updated to enable both Ayce and Party Pack packages to utilize CMPL pricing, instead of just Ayce (all-you-can-eat) packages. - In the reservation charge calculator, a new condition allows Party Pack packages with CMPL enabled to use the correct CMPL price.
- The come more pay less promotion checkbox is now shown for both per_person and Party Pack types (previously only per_person).
- When building the response for a regular (non-promo) price, if the package is a Party Pack, the type is set to 'pack' for consistency in downstream logic.
- The dynamic pricing title (e.g., "Come More Pay Less") is only shown if the group size is valid (group size > 0 and quantity >= group size).
- The email now displays a detailed dynamic pricing label (e.g., "Come 10 pay 8") if CMPL is active for a Party Pack.
- If a reservation is reduced with a promo (CMPL), an extra row is added to highlight the discounted price.
- Uses
.active_scope.firstfor finding restaurant packages, ensuring only active ones are considered. - Dynamic pricing labels are formatted to be more user-friendly and informative in the emails.
[
github.com
https://github.com/hungryhub-team/hh-server/pull/6671
](https://github.com/hungryhub-team/hh-server/pull/6671)
[
github.com
https://github.com/hungryhub-team/hh-server/pull/6732
](https://github.com/hungryhub-team/hh-server/pull/6732)
Frontend Implementation
Files Added These new files introduce “Facility” tags for restaurants (e.g., Wheelchair Access, Free Wifi, Pet Friendly) in English, Thai, and Chinese. Each facility includes an ID, icon, name, type, and the number of restaurants with that facility.
src/assets/json/facilityTags.json
src/assets/json/facilityTagsTH.json
src/assets/json/facilityTagsCN.json
Files Modified:
cityList.json, cityListTH.json, cityListCN.json
Updated the totalRestaurants count for cities such as Thailand and Singapore.
cuisineTags.json, cuisineTagsTH.json, cuisineTagsCN.json
Adjusted the totalRestaurants for various cuisine types (e.g., Chinese, Italian, French).
diningStyleTags.json, diningStyleTagsTH.json, diningStyleTagsCN.json
Adjusted the totalRestaurants for dining styles (e.g., Buffet, Fine Dining).
Reformatted the availableLocales field to be a multi-line array for better readability.
Adjusted the order of city objects for consistency.
In Chinese config, promptpayUnsupportedBanks is now a multi-line array.
For facility/location meta titles, descriptions, and page content (used for SEO and content display).
For new package types: comeMorePayLess, getMorePayLess, forPack, getPay, etc.
Components now accept a type prop, which influences label text:
If type === PACKAGE_CODE_PP, labels/buttons show “Get More Pay Less”; otherwise, show “Come More Pay Less.”
Adjusts dynamic label formatting (e.g., “Get 4 pay 2 for …”).
Improved localization and pluralization for price display (e.g., “forPack”, “forPerson”).
Refactored how badges/labels are generated for packages (see helpers/pack.ts and getPackageLabels.ts).
The formatMoney helper now displays negative values with a “-” sign and proper formatting.
PopUpTotalPrice.vue now constructs package labels and person/pack counts more robustly, and reports errors if a package is missing.
Updates to Pack.ts to ensure new fields, label types, and props are type-safe.
[
github.com
https://github.com/hungryhub-team/hh-pegasus/pull/1745
](https://github.com/hungryhub-team/hh-pegasus/pull/1745)
PRD & Task
PRD: Private (https://app.clickup.com/9003122396/docs/8ca1fpw-7922/8ca1fpw-41976)
[
hungryhubgroup.slack.com
https://hungryhubgroup.slack.com/archives/C02KL4CPXDM/p1725952200495849?thread_ts=1725945310.293139&cid=C02KL4CPXDM
](https://hungryhubgroup.slack.com/archives/C02KL4CPXDM/p1725952200495849?thread_ts=1725945310.293139&cid=C02KL4CPXDM)
Private (https://app.clickup.com/t/86cwf3kk0)
Design
Based on the quantity of package, not quantity of people.

It should be like this on the client side
Case : Get 5 pay 4
Package quantity ➝ 5 will be assumed to 4
Total ➝ 4*3000 ➝ 12000

API Blueprint
| Method | Path | URL | Description | Payload |
|---|---|---|---|---|
New Query
DB Schema / Database Migration
Improvement
| Feature Name | Date | What Changed | Description |
|---|---|---|---|