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.
Rules:
Toggle should only be visible by Intl market:
hidden: () => !ctx.isIntl
PATH FOR THE SOLUTION
Add the new toggle on
/src/schemas/menu/documents/add-on-section.tsx
DOD-LIKE
The initial value for this toggle: FALSE
This toggle should only be visible to Intl market
hidden: () => !ctx.isIntl
...
Motivation: the client wants to control freely the number of items. This will solve other business problems.
Label: Quantity of free add-ons
Description: (to be defined)
PATH FOR THE SOLUTION
As we’ll have other options we’ll have something equal to the original options (with different names)
The original option is referenced in the document using the schema for the options. We’ll need to do the same thing here
We’ll create our new fragment/object in the
src/schemas/menu/objects
DOD-LIKE
Add the new options on the UI
Condition the new options to be visible only if the new toggle is TRUE.
The modal for “+ Add item” should have:
Quantity of free items field
Item dropdown
...
Motivation: configure the add-ons free modal. The fieldset will help with the organization to group the fields
Label: (to be defined)
Description: (to be defined)
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 is TRUE
...
Image field
...
Modal title field
Label: (to be defined)
Description: (to be defined)
Modal description field
Label: (to be defined)
Description: (to be defined)
Modal button field
Label: (to be defined)
Description: (to be defined)
PATH FOR THE SOLUTION
For the fieldset, we have the Hero example on the Intl CMS repo and the doc from Sanity above
For the image, we can take a look at the item document from the CMS or other documents that have an image field and make the same
DOD-LIKE
All the fields should be children of the modal fieldset
The fieldset should not be collapsed when appears
Condition the new fieldset to be visible only if the new toggle is TRUE
...