Closed (won't fix)
Project:
e-Commerce
Version:
5.x-3.x-dev
Component:
subproducts
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2008 at 06:11 UTC
Updated:
25 Mar 2011 at 06:00 UTC
I don't know if this is by design or if it is a bug, but when I create a new apparel product and attempt to add a subproduct the module tells me that I am required to enter one attribute from each of the available variations on the list (which is huge). This shouldn't be this way. Some of the variations are for specific brands, and others only on certain specific products. Forcing the user to enter at least one attribute from each variation doesn't make any sense at all when you have a highly varied store with hundreds of different kinds of product combinations.
Comments
Comment #1
PixelClever commentedComment #2
cghobbs commentedI agree, this should be setup so that it is not required to check off one variation from each list. Any word on this?
Comment #3
PixelClever commentedI double checked and this is the same on version 3.4
Comment #4
cghobbs commentedI read elsewhere from the author of this module, that one should use EC Live Subproducts. I've started using that module and it works great. If your still looking for a solution that's what I would recommend using as well.
Comment #5
1kenthomas commentedcghobbs,
You are able to get EC Live Subproducts to install under 3.4 and a current version of Drupal?
Comment #6
PixelClever commentedNo, There was a major bug in the livesubproducts module version that I downloaded, so I gave up on it. I am waiting for the release of version 4. It just isn't worth the trouble of tangling with a buggy module that is about to be completely rewritten.
Comment #7
1kenthomas commentedThanks for the answer. Same here, actually, but a few people seem to have it running. At this point we've figured out how to get what we need done with the previous subproduct contrib...
Comment #8
djflux commentedI'll try to take a look at this problem in the next week and try to get a patch to change the functionality. Maybe a checkbox on the main add apparel screen that asks if one wants to add subproducts.
BTW, I think the parent product is already added when the generate subproducts screen is presented, so you can just click the View tab and your product should be ready for purchase.
You could also just create a shippable product. I'm really not sure what the apparel product type gives you besides subproducts anyway.
Comment #9
1kenthomas commentedFootnote: on the previous, we installed the existing subproducts for our customer, then, when receiving the same "you must select..." message, just submit again. Works.
We haven't been able to get EC Live Subproducts to install with any version of ecommerce since Jun '07 or so, on my "try again later" list.
Comment #10
mzogby commentedI've been rolling along beautifully defining (apparel) products and subproducts (specifying attributes for only one of many variants I have defined when generating subproducts for each of my products). Now all of a sudden I'm getting that same error "You must select at least one option from each of the variations." when I try to generate subproducts for a new product. Could there be a timing issue where the variants have to be all defined first before products are created and subproducts generated? ("submitting again" as suggested in the prev post did not work for me)
I tried deleting the new product completely, defining the variations and attributes, then creating the product again. I'm still being told that I have to select at least 1 option for EACH of the variant." It was not behaving like this before...what could I have done?
Not sure where to look to resolve this...any help would be greatly appreciated. If it's a bug, I don't understand why I was initially defining products/variants/subproducts as I had expected to (that is, specifying attributes for only one variant)???
site status report: drupal 5.2, mysql 4.1.8, PHP 4.3.11
(am I correct in assuming ECLive is bundled in this version of drupal? i don't see a separate module for it in my modules dir)
Comment #11
eshaman commentedAny progress on this bug? I am having the same problem. I might add that the issue was not there initially and changing to EC Live Subproducts at this stage is simply not an option as it would mean redoing the entire inventory.
Comment #12
1kenthomas commentedSee #7, #9. An update for EC Live Subproducts is not expected; existing subproducts will do (mostly) what EC did.
Comment #13
jdsaward commentedI'm having the same issue and am attempting to understand the code. The error message "You must select at least one option from each of the variations." is generated by the validation function for the first form of the wizard for generating the sub-products. That validation function is in subproducts.inc and I have copied the code into this comment, below. I am using 5.x-3.x-dev (2008-Nov-02).
It looks to me like there is an error of logic in the code. It counts the number of options across all variations. Then it sets an error if that count is less than the number of variations.
Assume we have 3 variations, each with 5 options.
If we select 1 or more option from each variation validation passes as we would expect (options >= 3).
But if we select each option for variation 1 (i.e 5 options) and none of the options for the other 2 variations, options = 5; variations = 3 and validation passes. But, we have some variations without selected options. Presumably in this case the process continues through submission and leads to correct creation of sub-products even though we do not have any options selected for 2 of the variations. So the validation seems a little redundant.
If we select only 2 options from the first variation and none from the other two variations, options = 2; variations = 3 and validation fails.
The code just does not make sense to me and the algorithm just does not seem to justify the error message in all cases. Please correct me if I am wrong here.
Regardless of that logic error, I am wondering what will happen if we just get rid of that validation. Anyone sufficiently familiar with the logic post-validation care to express an opinion?
I will test it via a form_alter as soon as I can (might be a few days).
Also I am wondering why we are sometimes calling a certain entity an 'option' and sometimes calling it an 'attribute'.
Comment #14
jdsaward commentedFollowing on from #13, I have stepped through the post-validation logic. That logic arises in function subproducts_generate_wizard2 and function subproducts_generate_wizard2_submit.
I cannot identify any reason why the constraint 'must select at least one option from each of the variations' is needed (whether or not that constraint is programmed correctly in subproducts_generate_wizard1_validate).
It seems to me from subsequent code that variations without at least one option (attribute) will be just ignored without upsetting the integrity of the application. Is that correct?
If that is correct, it would seem the validation can be dispensed with in the subproducts module, and meanwhile, over-ridden in any sites encountering this issue.
That's my proposal and I await refutation :-)
Initial testing on my site seems to confirm this fix.
Comment #15
mdowsett commentedsubscribing....where do we stand on this? I need a fix to this. It's frustrating that this restriction is in place
Comment #16
1kenthomas commentedSee #12 and previous. This can be accomplished with other submodules; the 3.x fork of e-commerce is no longer under active development; we're close to "won't fix."
Comment #17
gazzur commentedJust wanted to thank JDSaward for researching this - it's helped me enormously.
Comment #18
jdsaward commentedHey, Thanks so much for letting me know. Glad somebody else has gone down the same path. :)
Comment #19
1kenthomas commentedClosing; // outdated.