Skip to content

ratesAndBenefitsData element isn't included into orderForm object #71

@jsiesquen

Description

@jsiesquen

Describe the bug
Have my Minicart app customized and need read the ratesAndBenefitsData element with all promotions applied into cart, but this aren't exist... Should be exist why within "priceTags" element is showing the identifiers of each benefit. Bug!

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home'
  2. Add one or some products with an active discount promotion, this promotion should that apply immediately.
  3. Internally debug the orderForm from "'vtex.order-manager/OrderForm'",
  4. Checking this latest orderForm noted not exist the ratesAndBenefitsData node.
  5. Go at Cart page and debug vtexjs.checkout.orderForm and if exist the ratesAndBenefitsData node.

Expected behavior
The orderForm that we have available from the browser's DOM... should be a faithful copy of what is Vtex-app should deliver.

Screenshots
ratesAndBenefitsData available in browser's DOM, from orderForm:
image

Missing ratesAndBenefitsData obtain from order-manager:
image

Desktop environment:

Replicate a normal cart flow from a browser and debug linking from a workspace....

We try get the "benefits" from a GraphQL query using:

query benefitsByIdentifier ($field: ProductUniqueIdentifierField!, $values: [ID!], $salesChannel: String) { productsByIdentifier (field: $field, values: $values, salesChannel: $salesChannel) @context(provider: "vtex.search-graphql") { items { itemId name } benefits { id name } } }

...but the response data is for some products.

Another alternative is get ratesAndBenefitsData using VTEX API /api/checkout/pub/orderForm/{orderformId} but isn't optimal....

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions