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

Product link not available on CartSidebar when product has only 1 variation or SKU #2149

Open
fabsantandrea opened this issue Dec 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fabsantandrea
Copy link
Contributor

fabsantandrea commented Dec 6, 2023

Describe the bug

  • When a product has no variations and you add it to the cart, it has no link (slug) available on CartSidebar.

Expected behavior

  • All products, regardless of not having variations, should have a link to their detail page.

Current behavior

  • This is a screenshot of the items property that comes from the useCart hook:
    image

  • As you can see, the product with variations comes with differents slugs for each variation, but the product that doesn't have variations, it doesn't have a slug in the object.

Additional context
Add any other context, screenshots, or comments about the problem.

@fabsantandrea fabsantandrea added the bug Something isn't working label Dec 6, 2023
@victors1682
Copy link
Contributor

victors1682 commented Dec 6, 2023

In the useCart hook, we should have access to either the Link or linkText along with the product itself. This will give us the flexibility that allows us to utilize slugs if the product has variants. Otherwise, we can use the default product link.
Screenshot 2023-12-06 at 3 46 25 PM

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

2 participants