Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratesAndBenefitsData element isn't included into orderForm object #71

Open
jsiesquen opened this issue Nov 11, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jsiesquen
Copy link

jsiesquen commented Nov 11, 2022

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....

@jsiesquen jsiesquen added the bug Something isn't working label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant