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

Validation added at shouldAddToCart prop. #254

Closed

Conversation

marcosewbank
Copy link

What is the purpose of this pull request?
Add a new validation at the "shouldAddToCart" props of the "BuyButton" component that allows the costumer select the SKU and add the product at the cart directly from any search-result page.

Example: https://nimb.ws/6ACwdq

What problem is this solving?
Without the old validation the value of "shouldAddToCart" props is always false, redirecting the user to the product page.

Example: https://nimb.ws/uM6BZc

How should this be manually tested?
You can test the bug at:
https://miniprix.myvtex.com/femei

and the solution at:
https://addtocart--miniprix.myvtex.com/femei

Screenshots or example usage
How the code was working:
https://i.imgur.com/myupcgZ.png
https://i.imgur.com/pJwQPqo.png

My solution:
https://i.imgur.com/F0ZVWzq.png

@marcosewbank marcosewbank requested a review from a team as a code owner April 17, 2020 21:07
@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Apr 17, 2020

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch

  • Minor

  • Major

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@klzns
Copy link
Contributor

klzns commented Apr 17, 2020

Hi, @marcosewbank thanks for the contribution.

We have this #249 to do what you need.

I'm going to try to merge it next week.

@klzns klzns closed this Apr 17, 2020
@marcosewbank
Copy link
Author

marcosewbank commented Apr 17, 2020

@klzns please close this merge too #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants