First of all i want to say this module takes the cake and is one of the reasons i use Ubercart above other ecommerce solutions. THANKS for all your hard work.
This module is working great for me except for my recent realization that this module doesn't display the "please select" option for a product's attribute that's required (in select box).
What I've noticed this module does instead is it sets the select box with a default option (from my testing it doesn't seem to follow the set default option for that attribute, but displays the first in the list).
Upon selecting "required" for a given attribute, one would expect that the user is confronted with the "Please select..." text... if they don't select something other than "Please select... " they cannot add the product to the cart.
This module seems to sort of inherently "require an attribute option" simply by setting one as default, thus if the user doesn't select something other than the option in the top of the attribute list, that is what's added to the cart. This is not ideal, however, because the customer is not actually forced to select an option, rather they can add it to the cart with the default selected (again, the default being the option at the top of the list).
I did look through the issues and found a few related to this; however not directly.
I found this issue: http://drupal.org/node/273117 which might have been the cause for removing "Please select... " option from being the default option for required attributes- however i feel "Please select... " still needs to be there when an attribute is required.
I realize that "Please select... " could " go away" once another option is selected and the JS does it's thing; however it's not even showing upon the initial page load, because the JS immediately does it's thing respecting the "default" options and how they effect the price.
I also found this related feature request: http://drupal.org/node/782474 which seems to have been ignored, although recently posted. :)
Is anyone else experiencing this same behavior or is it just me? I appreciate any feedback- i am comfortable with modifying the code to a certain extent...
I found
if ($attribute->required) {
if ($attribute->display == 1) {
$options = array('' => 'Please select') + $options;
}
unset($attribute->default_option);
}
on line 755 of uc_attribute.module which if i understand correctly was altered by
function uc_aac_form_alter(&$form, $form_state, $form_id)
in uc_aac.module line 37.
I suspect
$options[$option->oid] = $option->name . $oid_text;
on line 114 of uc_aac.module is what needs to be modified, however i'm not sure. And i'm not sure how the javascript would be affected.
I am using
Drupal 6.16
Ubercart 2.2
AAC 2.0
example page: http://amishhandcrafted.websitedesignlancaster.com/content/generations-j...
See attribute: Chest Front Designs
Rather than having to set the first option manually as "none," it would be ideal to have "Please Select" which prompts the customer to actually make a choice if they don't.
Any feedback or questions would be greatly appreciated. thanks again!
Comments
Comment #1
nicholasThompsonDid you make any progress with this? I need the same feature...
Comment #2
nicholasThompsonIt looks like uc_acc breaks this feature...
Comment #3
cYu CreditAttribution: cYu commentedComment #4
cYu CreditAttribution: cYu commentedI was hoping to get to this in my recent assault on the issue queue, but did not.
Comment #5
SchwebDesign CreditAttribution: SchwebDesign commentedhaha no problem, thanks for the update. your work is appreciated
Comment #6
xl_cheese CreditAttribution: xl_cheese commentedDoes anyone have a current patch or work around for having the "please select" as the default option?
Comment #7
Summit CreditAttribution: Summit commentedSubscribing, greetings, Martijn
Comment #8
Oleg_url CreditAttribution: Oleg_url commentedI would also like to do it. Very thanks for the idea.
Comment #9
asb CreditAttribution: asb commentedIs there any progress on this issue, or is this a "won't fix"?
Comment #10
cYu CreditAttribution: cYu commentedBasically all the open issues are at won't fix unless a new maintainer steps up for this module, which seems unlikely for a module that is deprecated in D7.
Comment #11
asb CreditAttribution: asb commentedThanks for the clarification.
Comment #12
asb CreditAttribution: asb commented