Active
Project:
Commerce Bulk Product Creation
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2011 at 22:41 UTC
Updated:
15 Dec 2011 at 12:58 UTC
Hi,
Would it be possible to also add the description (body) field to the Product Info?
And may be posibility to select other fields also?
That way I can add one description which is general to all variations to a product and afterwards finetune to the specific productvariation.
Thanks a lot in advance for considering this!
Greetings, Martijn
Comments
Comment #1
sven.lauer commentedI am not sure what you are asking for here ... at first, I thought that you are asking simply for the ability to specify field values that are shared by all generated products---this is possible right now already, via the "static values" fieldset.
However, your mention of the body field makes me think that you might be asking for the following: Provide fields allowing to specify values of fields on the DISPLAY NODE for the generated products (this would be most useful for the "Create one display node per created product" mode). I can see how this could be useful, but I have no plans to implement this in the near future. This COULD be done in an external module, though there is no direct support in BPC for this (it would take a form_alter() adding a #submit handler, and the submit handler to override the standard behavior---not ideal, and in the near(ish) future (post 1.0), I will introduce an API that makes things like this easier to do.
Long story short: Won't happen quickly, unless someone steps in.
Comment #2
summit commentedHi,
I thought about this more..
1a) wouldn't it not be possible to make an extra description field in the product info?
1b) and add a sort of token for body like [bulk_defaults:entered_title]: [bulk_defaults:entered_body]
1c) and then add this info to the product-display, as is done by the [bulk_defaults:entered_title] token for node-display title?
Thanks a lot for your quick replies and still without this it is a great module!
Greetings, Martijn
Comment #3
summit commentedHi, reading thoroughly through the issuequeue, may be what I want can already be achieved.
I see: http://drupal.org/node/851812#comment-4443204 and read - Should all text fields get token replacements? I can see that as useful at least in textareas that have product descriptions or instructions for use, etc.
Does this mean when I add another field which I name for instance field_productbody and add generic text to this and select it as Static value (so the values of this field in this section will be shared by all of the created products).
Can I get this field somehow through a token in the body field of the productdisplay (node)?
1) How does this field get its own token?
2) How do I get this field fill in the build productdisplays (nodes)?
Thanks a lot for your reply again in advance.
greetings, Martijn
Comment #4
summit commentedHi,
I still would love to have the possibility to fill the body field with a token but I did the following as a workaround:
For a producttype:
- 1) I build a textarea field: promotiontext
- 2) I added the static value to this field promotiontext
- 3) I filled this field promotiontext with the content I would to share for all variations of the product
- 4) I choose the term variation selector
- 5) I added the commerce_product promotiontext field to my node panel.
Voila the generic promotiontext is shown with every variation selected for BPC.
Still the best way should be to use the body field for this. I had to add a new field which makes it more complex.
Greetings, Martijn
Comment #5
sven.lauer commentedAs I said, I see how this could be useful, but a day has only 24 hours (and the time I can spend on commerce_pbc is limited), so I cannot promise that I myself get to implement something like this soon.
With regard to #3: I was speculating about how it could be useful (and in an earlier version, I had some code for this) to perform token-replacement on text fields attached to the product. This, in itself, still would not fit your use case, as you want to be able to put things into the display node body. Doing this would not be impossible. However, I think a better plan would probably be to display the display node creation form even in "one display per product" mode, and then use the supplied values for all created display nodes. Again, this is not particularly hard to implement, and could even be done (with some more effort) in an external module. But I won't get to do this myself anytime soon (right now, the goal is to finally get a 1.0 release out, and after that to do some refactoring / additions to the API that makes things like what you ask for easier to implement).
Comment #6
summit commentedHi, Thanks again for your quick reply, and sorry if my response made you think to hurry up with the solution. That was not intended.
I am myself not a programmer and am sometimes frustrated I can not get the job done. With the workaround to use another field as a sort of body I can do what I want for 80%, and thats ok by me for now.
May be there is a module that will copy the values from a selfmade field to the body of a productdisplay? Will investigate this more.
Off course you should give your energy for pushing a 1.0 release out with bugfixes.
Greetings, Martijn
Comment #7
sven.lauer commentedCommerce bpc will use a "core like" release management, meaning that new features will go into the 2.x branch (but might be backported).