I've just been inputting some new products, and come to think of it, SKU, title and image have to be different for each product anyway, so there really isn't anything to clone!
Would this speed up the process of creating products with multiple attributes? I'd love to be able to use one product entity as the "base product" and then create a bunch of variants based on that. Seems like cloning is the best answer to how to do that.
I think it would be good to be able to clone either. What I don't understand is why product types aren't content types, and why products aren't nodes. If so, then things like node_clone would work already. You wouldn't have to replicate a whole heap of functionality written for nodes.
I'm guessing I'm not the only one who feels this way. If there is some rationale for the current architecture, please post a link so I can read why it was done this way. If there's a discussion on this matter, please let me know :)
This was one of the earliest decisions we made, based particularly on the fact that in Drupal 7, everything shouldn't be a node. The conversation here is probably a little bit dated, but this was the spark: http://www.drupalcommerce.org/node/49
Agreed, cloning product types would be a great idea, especially if those product types come with a set of predefined fields. It makes adding, say, cloning a "Shirt" type to make "Hoodies" - especially if I don't have to go into Hoodies and add every field again.
- The product type "cloning" is more a feature request against the Field API / Field UI itself. There is a corresponding issue in the core queue: #100925: Add "OO" bundle inheritance features
- The product cloning is waiting on a generic entity cloning UI. It's purely a UI issue at this stage, as cloning an entity is mostly trivial
I fear that tossing this desired Commerce capability into the broader "future Drupal" wish-list means it will NOT be implemented anytime soon.
I think one-click Product cloning is essential to Commerce, and could even affect whether the Commerce gets adopted, since almost all other e-commerce systems I've evaluated already have this ability.
While Commerce (bulk product creation) won't clone an existing product, it may be of some help to those requesting the clone feature because they have a need to create a bunch of related products: http://drupal.org/project/commerce_bpc
I am trying to open a store on my existing website to raise some funds for educational project. I would like create a "store" menu on my top menu and a list of several products in store page. Is there anyone could tell me how to create the store menu and make sure those several created products will show up in the store page. thanks in advance.
agileadams Sandbox project seems to do exactly what I been wanting since day one of trying Commerce. Not being able to clone complex products with small variations makes commerce really time consuming and tedious. Bulk creation is good, but there are a lot of instances where it isn't the right solution in the real pragmatic world of product creation. For instances if you need to assign an individual image to each slightly different product.
Big thanks for sharing!
@mausolos,
I'm really sorry about this... I've been swamped with other projects. It's on my todo list to make promote this to a full project.
I cannot give you an ETA, but you're not the first person to ask, so I'll try to address it really soon.
-Adam
Yes! The product clone/copy feature would be cool when you get a set of new colors for a specific product. I know about the http://drupal.org/project/commerce_bpc module, but it seems it "only" creates multiple products.
It would be cool to do a pattern after type of feature to similar products or when superseeding products.
Yes this is exactly what we need! I run a online training site and have over 80 courses that need to be cloned per course quarter. This will make the admin much easier as they are all base courses with new dates - no other changes. ;):) YAY!
Having given this a little more thought, I think a "clone entity" feature or module would be considerably more useful overall than simply "clone product". Then you could use it to clone users, nodes, terms, files, products, relations, etc. Is there any such module in the works?
@mossy2100 Exactly our thoughts - cloning isn't specific to product entities or bundles, so I'd rather there be a generic solution that "just works" for Commerce, too. : )
@klonos: bundle_inherit seems to be more about entire entity types, not specific instances of an entity type. So this would be like, "make a clone of Basic Page", as opposed to "clone Basic Page node #42". The latter might produce node #43 (for instance), and fill in all the fields from #42.
It would appear that the developers of the entity API have, in fact, included an $op function for "clone" which does everything we want it to, I think. I believe it is "simply" a matter of inserting the appropriate code into Commerce entities so that they can utilize it.
From entity.api.php:
* - admin ui: (optional) An array of optional information used for providing an
* administrative user interface. To enable the UI at least the path must be
* given. Apart from that, the 'access callback' (see below) is required for
* the entity, as well as the 'ENTITY_TYPE_form' for editing, adding and
* cloning. The form gets the entity and the operation ('edit', 'add' or
* 'clone') passed. See entity_ui_get_form() for more details.
This makes me think that it would probably be better to put this into Commerce instead of making an external module; it's a basic, optional function of entities, and products should just be able to do it.
so maybe sitting and waiting a bit to see if/when they release an Entities update, and how the Profile2 issue resolves, then just copying whatever they are doing with Profile2 :)
Has any work been done on this already? I'm willing to chip in some time and get a patch going.
Has any work been done by anyone, or is this still at brainstorm/planning stage?
This link in particular indicates that work is being done on the Entity API side of things, any day now we should see a repo update, I would think: http://drupal.org/node/1513812
My sense is, there might be some work you can do now based on the patch (and omg, it would be very welcome!), but it may be best to just wait until the patch is at least applied to dev? I haven't tried the patch myself, yet. Maybe just see if that alone solves this issue, as well?
Comments
Comment #1
realityloop commented+1
Comment #2
Scott J commentedAgree!
Comment #3
rszrama commentedDo you think we really need to clone products or product types? Or both? : )
Comment #4
Scott J commentedI was only thinking about products. I don't use many product types, so that doesn't bother me.
Comment #5
Scott J commentedI've just been inputting some new products, and come to think of it, SKU, title and image have to be different for each product anyway, so there really isn't anything to clone!
Comment #6
torgospizzaWould this speed up the process of creating products with multiple attributes? I'd love to be able to use one product entity as the "base product" and then create a bunch of variants based on that. Seems like cloning is the best answer to how to do that.
Comment #7
realityloop commentedI also think it only really makes sense for Products
Comment #8
videographics commentedYes, clone products please.
Comment #9
mossy2100I think it would be good to be able to clone either. What I don't understand is why product types aren't content types, and why products aren't nodes. If so, then things like node_clone would work already. You wouldn't have to replicate a whole heap of functionality written for nodes.
I'm guessing I'm not the only one who feels this way. If there is some rationale for the current architecture, please post a link so I can read why it was done this way. If there's a discussion on this matter, please let me know :)
Comment #10
rszrama commentedThis was one of the earliest decisions we made, based particularly on the fact that in Drupal 7, everything shouldn't be a node. The conversation here is probably a little bit dated, but this was the spark: http://www.drupalcommerce.org/node/49
Comment #11
karol haltenberger commentedBoth!
Comment #12
torgospizzaAgreed, cloning product types would be a great idea, especially if those product types come with a set of predefined fields. It makes adding, say, cloning a "Shirt" type to make "Hoodies" - especially if I don't have to go into Hoodies and add every field again.
Comment #13
artatac commentedsub
Comment #14
damien tournoud commentedI'm moving this to the contributed queue.
- The product type "cloning" is more a feature request against the Field API / Field UI itself. There is a corresponding issue in the core queue: #100925: Add "OO" bundle inheritance features
- The product cloning is waiting on a generic entity cloning UI. It's purely a UI issue at this stage, as cloning an entity is mostly trivial
Comment #15
videographics commentedEntities to the rescue... again! Don't ya love it?! :-)
Comment #16
adamgerthel commentedSubscribing
Comment #17
hawkdrupal commentedI fear that tossing this desired Commerce capability into the broader "future Drupal" wish-list means it will NOT be implemented anytime soon.
I think one-click Product cloning is essential to Commerce, and could even affect whether the Commerce gets adopted, since almost all other e-commerce systems I've evaluated already have this ability.
For more, see this:
http://drupal.org/node/1202682#comment-5056190
Comment #18
videographics commentedWhile Commerce (bulk product creation) won't clone an existing product, it may be of some help to those requesting the clone feature because they have a need to create a bunch of related products:
http://drupal.org/project/commerce_bpc
Comment #19
liupascal commentedSubcribing...
Comment #20
torgospizza@liupascal:
You no longer have to comment to subscribe to threads. Just click the green "Follow" button at the top of the page.
Comment #21
davidgj commentedhey guys
I am trying to open a store on my existing website to raise some funds for educational project. I would like create a "store" menu on my top menu and a list of several products in store page. Is there anyone could tell me how to create the store menu and make sure those several created products will show up in the store page. thanks in advance.
David
Comment #22
rfay@davidgj, you need to stay with the topic on an issue, not hijack it. Your request would fit better in the forums at http://drupalcommerce.org.
Comment #23
starsinmypockets commentedI'm also looking for this functionality for an existing site, at the request of the site administer.
Comment #24
FrancescoUK commentedRemoved as OT comment, I've realised later that we are talking about products and not product display.
Comment #25
adamgerthel commented@FrancescoUK, when you say
Are you referring to products or product displays? Products are not nodes, they are a different type of entity.
Comment #26
agileadamI've created a simple sandbox project that offers product cloning.
http://drupal.org/sandbox/agileadam/1540050
Comment #27
leanderl commentedagileadams Sandbox project seems to do exactly what I been wanting since day one of trying Commerce. Not being able to clone complex products with small variations makes commerce really time consuming and tedious. Bulk creation is good, but there are a lot of instances where it isn't the right solution in the real pragmatic world of product creation. For instances if you need to assign an individual image to each slightly different product.
Big thanks for sharing!
Comment #28
brephraim commentedAny chance of "Clone product type" functionity?
Comment #29
mausolos commentedSo how/when does the agileadams sandbox project become a real module? Still waiting on this, wish I had time to work on it for the community myself...
Comment #30
agileadam@mausolos,
I'm really sorry about this... I've been swamped with other projects. It's on my todo list to make promote this to a full project.
I cannot give you an ETA, but you're not the first person to ask, so I'll try to address it really soon.
-Adam
Comment #31
grn commentedYes! The product clone/copy feature would be cool when you get a set of new colors for a specific product. I know about the http://drupal.org/project/commerce_bpc module, but it seems it "only" creates multiple products.
It would be cool to do a pattern after type of feature to similar products or when superseeding products.
Thanks for this kewl product!
Comment #32
ontwerphuis commentedYes this is exactly what we need! I run a online training site and have over 80 courses that need to be cloned per course quarter. This will make the admin much easier as they are all base courses with new dates - no other changes. ;):) YAY!
Comment #33
summit commented@ontwerphuis see #26, this is working great!
greetings, Martijn
Comment #34
ontwerphuis commented@ Summit Thanks!
Comment #35
jalves commentedThat is really important, at least product cloning. Anyone knows when this could be available?
Comment #36
leanderl commentedIf you use the inline entity form you could try the patch for "clone button" that I'm trying to get into that module
http://drupal.org/node/1590146
Comment #37
mossy2100Having given this a little more thought, I think a "clone entity" feature or module would be considerably more useful overall than simply "clone product". Then you could use it to clone users, nodes, terms, files, products, relations, etc. Is there any such module in the works?
Comment #38
jalves commentedI found this http://drupal.org/node/1758758 (dev version) i've just installed to test it, it works for product cloning.
I'll have to try the #36.
Comment #39
rszrama commented@mossy2100 Exactly our thoughts - cloning isn't specific to product entities or bundles, so I'd rather there be a generic solution that "just works" for Commerce, too. : )
Comment #40
klonoshttp://drupal.org/project/bundle_inherit perhaps?
Comment #41
mausolos commented@klonos: bundle_inherit seems to be more about entire entity types, not specific instances of an entity type. So this would be like, "make a clone of Basic Page", as opposed to "clone Basic Page node #42". The latter might produce node #43 (for instance), and fill in all the fields from #42.
It would appear that the developers of the entity API have, in fact, included an $op function for "clone" which does everything we want it to, I think. I believe it is "simply" a matter of inserting the appropriate code into Commerce entities so that they can utilize it.
From entity.api.php:
http://drupalcontrib.org/api/drupal/contributions%21entity%21entity.modu...
http://drupalcontrib.org/api/drupal/contributions%21entity%21includes%21...
http://drupalcontrib.org/api/drupal/contributions%21entity%21includes%21...
This makes me think that it would probably be better to put this into Commerce instead of making an external module; it's a basic, optional function of entities, and products should just be able to do it.
Comment #42
mausolos commentedI wasn't satisfied with my approach last post of dumping everything in someone else's lap, so I did a little more research:
Profile2 apparently implements the clone entity functionality
(reference to an Entities API example: http://drupal.org/node/1021576)
but there have been some issues with it:
http://drupal.org/node/1317446
Things only very recently have been resolved (maybe?):
http://drupal.org/node/1513812
so maybe sitting and waiting a bit to see if/when they release an Entities update, and how the Profile2 issue resolves, then just copying whatever they are doing with Profile2 :)
Comment #43
klonosThanx for linking to these issues Charles. I'm following them. What you say makes total sense.
Comment #44
rob c commentedHas any work been done on this already? I'm willing to chip in some time and get a patch going.
Has any work been done by anyone, or is this still at brainstorm/planning stage?
Comment #45
mausolos commentedHey Rob,
This link in particular indicates that work is being done on the Entity API side of things, any day now we should see a repo update, I would think:
http://drupal.org/node/1513812
My sense is, there might be some work you can do now based on the patch (and omg, it would be very welcome!), but it may be best to just wait until the patch is at least applied to dev? I haven't tried the patch myself, yet. Maybe just see if that alone solves this issue, as well?
Comment #46
strr commentedAny news here or a timeline for release of that feature?
Comment #47
strr commentedThis is a must have feature ?
Comment #48
summit commentedHi, this is working for me: http://drupal.org/sandbox/agileadam/1540050
greetings, Martijn
Comment #49
dave kopecek#48 Saved my morning. Props to agileadam for Commerce Product Clone module.
Comment #50
bojanz commentedInline Entity Form has a clone button nowadays.