Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Repos that we’ll change

...

  • Motivation: this toggle will enable the new feature integration for “free/promotional items” on the cart

  • Label: Make Options in this Section as Free Add Ons

  • Description: By turning this on, guests will be able to add the options in the list of add-ons for free to their order. You can choose which items in the order are eligible to grant free add-ons and also how many add-on units will be free of charge per item. Note: to list add-ons as free, there needs to be a 0.00 PLU item configured respectively to the regular price PLU.

  • Rules:

    • Toggle should only be visible by Intl market: hidden: () => !ctx.isIntl

...

We’ll have two new fields: “Free addon item” and “Menu items to offer the free item” on the add-on-section-option.ts:

“Free addon Item”

  • Label: Free Option

  • Description: The free option needs to be a 0.00 PLU version of the regular price option. If the options listed here are not 0.00 PLU, they will NOT appear as free for the guest.

  • Rules:

    • Type reference to type item (as the “Option” that we already have on the screen)

    • Should be hidden if:

      • !ctx.isIntl AND !ctxTest.document.enableAddonAsFreeItem

    • Required/invalid if:

      • context?.document?.enableAddonAsFreeItem && !value (validation prop with custom rule)

...

“Menu items to offer the free item”

  • Label: Menu Options that Offer the Free Options Above

  • Description: The option listed above in the “Free option” section will be offered by the ones listed here for the guests that have them in their cart at checkout.

  • Rules:

    • Type array to type addOnSectionMenuOptions (suggestion of name… we’ll create the new object that will be used here)

    • Should be hidden if:

      • !ctx.isIntl AND !ctxTest.document.enableAddonAsFreeItem

    • Required/invalid if:

      • context?.document?.enableAddonAsFreeItem && !value (validation prop with custom rule)

...

For this object we’ll have:

“Free quantity”

  • Label: Maximum Free Add-On Amount

  • Description: This is the max limit for the Free Add On Item that will be offered by this Menu Option.

  • Rules:

    • validation: (Rule: any) => Rule.min(1)

    • Required (can’t be empty)

    • initialValue: 1

    • Type: number

 

“Menu item”

  • Label: Menu Option

  • Rules:

    • Type reference to type item (as the “Option” that we already have on the screen)

    • validation: (Rule: any) => Rule.required()

...

  • Motivation: configure the add-ons free modal. The fieldset will help the organization, by grouping the fields

  • Label: Free Add On Modal

  • Description: When a guest has a Menu Option that offers a Free Add On Item in their cart at checkout, this modal will appear for them to add the Free Add On Item.

  • Rules:

    • The fieldset should not be collapsed when appears (DOC)

    • All fields should be children of the fieldset

    • The fieldset should only be visible if the toggle for add-on free items is ON

...

  • Modal toggle (to show/hide on the Whitelabel App):

    • Label: Show Free Add-On Modal at Checkout

  • Modal title field

    • Label: Title

  • Modal description field

    • Label: Description

    • Description: Used to provide context to the guest why they‘re seeing the modal and what is the offer.

  • Modal primary button field

    • Label: CTA

    • Description: This is the action to add the Free Add-On item to the order.

  • Rules:

    • If the toggle is ON

      • The title and primary button should be filled in and are required. This is needed to prevent the user from publishing the document and to not show an empty modal on the Whitelabel App

      • Description and image fields are optional

      • Important: these fields need to be localized ones

...