Versions Compared

Key

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

This is a template that should be used to document each feature. It’s meant to be easy, not prescriptive - change it at will!

Table of contents

Table of Contents

Definition

Status

Status
titleNOT STARTED

RBIberia Owner

RBI Owner

❓ Open questions

Info

We need to constantly make this section empty.

Requirements

Problem statement

Acceptance criteria

Success metrics

🤔 Assumptions

Solution

Scenarios

Info

Note: these are high-level scenarios that must pass testing before we can release the feature. They should also be used to drive design. Note that we do not specify user interface details in these steps - that is deliberate so that we focus on the process and not on the UI since the UI can change throughout design and development.

Scenario 1: Use the useCartAddOns method and all the addOn extras feature that already exists in the application

Expected results

Expect that

(validating)

Add extras feature: /wiki/spaces/FE/pages/3497590902

  • Create a new section above the “Add to Order” as in Figma

  • Create a new specific component to deal with the bag item in the cart

  • Create a hook to get data from Sanity and perhaps hold the logic to consume the other hooks that we need for the addOn extras (update the quantity in the cart, etc)

  • Adjust the CSS grid logic to deal with these new items on the screen

Advantages

  • The feature is complete and will deal with all the cart, reordering, receipts, and so on for us in a free way. (prevent bugs or missing things in the flow)

  • The development will be faster as the method is already generic to receive more than one section

Disadvantages

  • Only the edit part will be different from what we have on Figma (editing through the Extras modal and etc)

Sanity

The Sanity part is already made for the proposed Solution

Image Added

This is the vision of the created Add On Section for the bag example. We can click on the “+ Add item” and find the bag in the list (after register the item in MDS)

Image Added

Important points:

  • When we added your item through the useCartAddOns we cant edit the extra item quantity directly (more info about this on the Extras documentation). For this, we’ll need to click on the “edit” button to edit the quantity through the Extras modal.

Image Added

Image Added

Questions

  • Extras items limit can be affected when the bag is added?

    • R:No. The AddOn feature has the ability to create exclusive sections that have your own limit for the items that will hold on.

      Extras sections.mp4
  • Can we think of something more generic? To not be looking at a specific item from Sanity

Scenario 2: Transform the Upsell component into something generic to be reusable

Today we have an Upsell feature which is a section to add extra items to the Order.

Image AddedImage AddedAdd order example.mp4

The idea here is:

  • Transform this specific component to be something generic and with this, the component can be used in the specific Upsell section in Sanity (as is today) but will also be possible to use this component for other desired sections (today this component is not generic)

  • Create a new document/section in Sanity for the bag

  • Implement the new UI in the Whitelabel (as proposed in Figma) where the new generic Upsell will be used with the data from the bag section

Advantages

  • The edit is free and we can have the “-” and “+” to control the item inside the “Your cart section”

  • If the component is generic we’ll be using the original idea but in an adapted way. Perhaps this will not cause many bugs and the generic new Upsel will work as the original (inheriting your bugs and features)

Disadvantages

  • The complexity to understand how the component works and transform all the mechanics and sub-components into something generic that will need to accept any section from Sanity.

Questions

  • Today from what I saw until now if we click on the “edit” when using the Upsell feature this will send us to the menu item page. Do we’ll have a page for the bag item? (with info and etc.)

    • R:

Design

Figma design here: [insert link]

Development

Release