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

New plugin: Duplicate product plugin #385

Closed
martijnvdbrug opened this issue Mar 14, 2024 · 1 comment
Closed

New plugin: Duplicate product plugin #385

martijnvdbrug opened this issue Mar 14, 2024 · 1 comment
Labels
feature New feature

Comments

@martijnvdbrug
Copy link
Member

For the Huidpraktijkshop project, we would like to have the ability to duplicate a product from the admin UI:

  1. Admin navigates to product-A detail page
  2. Admin clicks Duplicate
  3. Admin is redirected to the duplicated product product-A-copy
  4. All fields need to be duplicated, including:
  • Facet values
  • custom fields
  • Custom field of type relation. E.g. we have 'related products' in the Huidpraktijkshop project, which would also need to be duplicated.

Implementation

My proposal (I'd like to hear your thoughts on this):

  1. Create a Graphql mutation duplicateProduct(id: ID!): Product! that returns the duplicated product
  2. The duplicated product is only created in the current channel, based on the CTX
  3. An admin UI action bar button duplicate is added that calls the mutation duplicateProduct and redirects to the duplicated product detail page
  4. E2E test: Please add an e2e test that includes a product with a plain text custom field, and a relation custom field, like related product
@martijnvdbrug martijnvdbrug added the feature New feature label Mar 14, 2024
@martijnvdbrug martijnvdbrug changed the title Duplicate product plugin New plugin: Duplicate product plugin Mar 14, 2024
@martijnvdbrug
Copy link
Member Author

This will be in core, not a new plugin. vendure-ecommerce/vendure#627

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

No branches or pull requests

1 participant