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

[admin-ui] Default variant not created when creating product #2337

Closed
zehawki opened this issue Aug 7, 2023 · 0 comments
Closed

[admin-ui] Default variant not created when creating product #2337

zehawki opened this issue Aug 7, 2023 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@zehawki
Copy link

zehawki commented Aug 7, 2023

Describe the bug
When a new product is created, it cannot be used directly since it does not appear in the variantList or variants key of the API response. Only variants carry price and stock and other info for add-to-cart and checkout etc.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Admin UI
  2. Add a new product without variant
  3. Exercise relevant API (eg ProductList)

image

        {
          "id": "55",
          "name": "New product A without variant",
          "slug": "new-product-a-without-variant",
          "description": "<p>This is a test for a new product being created in the Admin UI without variant being explicitly created. What will show in GraphQL?</p>",
          "featuredAsset": null,
          "variantList": {
            "totalItems": 0
          },
          "variants": []
        },

Expected behavior
When a new product is created, it would be good to have at least 1 variant created by default.

Environment (please complete the following information):

  • @vendure/core version: v2

Additional context

  1. This seems to be an inadvertent change in v2. In the admin-ui in V1 the variant is prefilled when creating a product.
  2. https://discord.com/channels/1100672177260478564/1133746905860542474
@zehawki zehawki added the type: bug 🐛 Something isn't working label Aug 7, 2023
@michaelbromley michaelbromley moved this to 📋 Backlog in Vendure OS Roadmap Aug 11, 2023
@michaelbromley michaelbromley moved this from 📋 Backlog to 🏗 In progress in Vendure OS Roadmap Aug 11, 2023
@michaelbromley michaelbromley moved this from 🏗 In progress to ✅ Done in Vendure OS Roadmap Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
Status: 🚀 Shipped
Development

No branches or pull requests

2 participants