Well, come to think of it, refiling as a bug report. It ought to display a message or something if the global attribute settings have options but this product doesn't. I only happened upon this by debugging the code.
Do you think this should be a constant message, or just a one-time notice that appears when the product's attribute form is submitted? I don't know if anyone actually does it, but it's conceivable for someone to intentionally leave off the product options because they want the text field for that product.
I would say check them all by default, and let me *un*check them if there's some I don't want as options. That'd make the most sense in my use case anyway. I'm not sure what people are doing with attributes on a normal basis.
I agree. For what I do it is much easier to uncheck the items that are not used. Since people have already set certain options for the attributes, I think they would expect them to by enabled by default for that attribute.
I've got the same problem, although I don't seem to be able to resolve it either at a global level for the attribute or at a specific level for the individual product. Both are set to Drop down box and I end up with a text field.
» Let admin push class attribute/option changes out to existing nodes
Category:
bug report
» feature request
Status:
active
» needs review
I'm going to reassign this issue b/c it's more a feature request now than a bug report. I like the idea of having global defaults that get pushed out to products, though it sounds like there was some interest in changing the way options work by default. The attached patch can be a beginning to addressing the situation... it allows you to do this for D6, and we can see if cha0s can re-roll it to change it so options are enabled by default. This patch itself needs testing, too.
webchick, your feature request in #5 has been granted as of #326352-6: Document Enabling Product Attributes. I decided it was the most common use case, but it's not really part of this issue's scope. Perhaps it will alleviate it some.
I'm not 100% sure on this, and Eaton would know better than me (cause he was the one giving the talk at DCC) but I think that views2 administrative actions (I can't even remember the name for certain ... still gotta get my notebook I left down there :P) will allow us to do things like this, like batch operations modifying some aspect of a node. We probably just have to define some action to views to allow that.
Wanted to post the patch since the discussion has moved here.
I'm marking it as CNW because Postgres doesn't have any way to do ON DUPLICATE KEY UPDATE. Even though the update doesn't do anything, there isn't even INSERT IGNORE available.
The comment next to the default option raises an interesting problem. Should there be a similar mechanism to push options out to the products as well? I'm starting to realize the serious limitations of the API. As is, you still have to go to each product to enable all of the options for the attribute, even though this is taken care of when the attribute is added to the product through the form.
Patch was great, but uc_attribute.module has changed a lot since then. I tried merging a patched version of the file with the latest, but far more has changed than I am familiar with. Can someone else who is more familiar with this module give it a shot? Would be most appreciated!
I'd be very interested in this functionality as I have literally thousands of products and it will be a major headache going into each and every product to add the attributes for each!
I tried downloading the latest version of dev and applied the patch (manually, automatically didn't work as with Joshua) and I got the checkbox that says "Push this attribute to these product classes"... But for some reason even when I ticked this it didn't work?
Here are the steps I took:
Created a product type (class)
Created a new product (node/add) of that product type
Went to the attributes and added an attribute "Flavour"
Ticked the new class under "Push this attribute to these product classes" and submitted the form
Added options for the "Flavour" attribute
Went to the product (node) for the new product type but no "Flavour" dropdown was present
Clicked the product type (class) attributes and noticed no "Flavour" attribute there already either (I guess which is why the product itself had no dropdown)
Did I miss something? I have a feeling I have... But can't think what? I also tried adding an attribute directly for the product type and selected the "Push this attribute..." but that didn't do anything either.
Any ideas?
By the way I'd be more than happy to help test (and even contribute if I can get my head around the code ;)) any patches etc... So let me know if there are any further steps I can take to help get this feature on the go! :)
Some documentation:
This patch will allow to flush products attributes. Under flush I mean that product attribute settings set on node level will be ERASED and then class settings will be applied/
BACKUP your database & files
Apply patch
FLUSH CACHE
Edit any product class and set necessary attributes with options
Patch should add "Bulk" tab when you're on class edit pages
Thank you SO MUCH for this patch!! It worked perfectly for me. Absolutely great and just how I imagined/hoped it would work!! The only issue is that I couldn't actually apply the patch automatically (I'm using TortoiseSVN) but by applying it manually everything seemed to transfer over so thanks!!
Setting the status of this to "reviewed & tested by the community" however if anyone has any issues with the patch then feel free to change it.
This worked fantastic for me also. As already mentioned, I needed to manually apply the patch, but that was probably more of an issue with my environment than the patch file. Thanks so much. This has saved me a ton of time.
#1
My mistake. I had specified the options at the global level, not at the product level.
#2
Well, come to think of it, refiling as a bug report. It ought to display a message or something if the global attribute settings have options but this product doesn't. I only happened upon this by debugging the code.
#3
#4
Do you think this should be a constant message, or just a one-time notice that appears when the product's attribute form is submitted? I don't know if anyone actually does it, but it's conceivable for someone to intentionally leave off the product options because they want the text field for that product.
#5
I would say check them all by default, and let me *un*check them if there's some I don't want as options. That'd make the most sense in my use case anyway. I'm not sure what people are doing with attributes on a normal basis.
#6
I agree. For what I do it is much easier to uncheck the items that are not used. Since people have already set certain options for the attributes, I think they would expect them to by enabled by default for that attribute.
#7
I agree that having the options checked by default would be a big time-saver and it makes sense for my purposes.
#8
I've got the same problem, although I don't seem to be able to resolve it either at a global level for the attribute or at a specific level for the individual product. Both are set to Drop down box and I end up with a text field.
#9
I'm going to reassign this issue b/c it's more a feature request now than a bug report. I like the idea of having global defaults that get pushed out to products, though it sounds like there was some interest in changing the way options work by default. The attached patch can be a beginning to addressing the situation... it allows you to do this for D6, and we can see if cha0s can re-roll it to change it so options are enabled by default. This patch itself needs testing, too.
(Pasted from http://www.ubercart.org/forum/support/6321/refresh_all_products_after_ad....)
#10
webchick, your feature request in #5 has been granted as of #326352-6: Document Enabling Product Attributes. I decided it was the most common use case, but it's not really part of this issue's scope. Perhaps it will alleviate it some.
#11
I'm not 100% sure on this, and Eaton would know better than me (cause he was the one giving the talk at DCC) but I think that views2 administrative actions (I can't even remember the name for certain ... still gotta get my notebook I left down there :P) will allow us to do things like this, like batch operations modifying some aspect of a node. We probably just have to define some action to views to allow that.
#12
Wanted to post the patch since the discussion has moved here.
I'm marking it as CNW because Postgres doesn't have any way to do ON DUPLICATE KEY UPDATE. Even though the update doesn't do anything, there isn't even INSERT IGNORE available.
The comment next to the default option raises an interesting problem. Should there be a similar mechanism to push options out to the products as well? I'm starting to realize the serious limitations of the API. As is, you still have to go to each product to enable all of the options for the attribute, even though this is taken care of when the attribute is added to the product through the form.
#13
I think I have a more recent version of this patch here.
#14
Patch was great, but uc_attribute.module has changed a lot since then. I tried merging a patched version of the file with the latest, but far more has changed than I am familiar with. Can someone else who is more familiar with this module give it a shot? Would be most appreciated!
Thanks!
.:Joshua
#15
#16
#17
I'd be very interested in this functionality as I have literally thousands of products and it will be a major headache going into each and every product to add the attributes for each!
I tried downloading the latest version of dev and applied the patch (manually, automatically didn't work as with Joshua) and I got the checkbox that says "Push this attribute to these product classes"... But for some reason even when I ticked this it didn't work?
Here are the steps I took:
Did I miss something? I have a feeling I have... But can't think what? I also tried adding an attribute directly for the product type and selected the "Push this attribute..." but that didn't do anything either.
Any ideas?
By the way I'd be more than happy to help test (and even contribute if I can get my head around the code ;)) any patches etc... So let me know if there are any further steps I can take to help get this feature on the go! :)
Thanks :)
#18
Attaching new patch.
Some documentation:
This patch will allow to flush products attributes. Under flush I mean that product attribute settings set on node level will be ERASED and then class settings will be applied/
#19
#20
drupalprojects,
Thank you SO MUCH for this patch!! It worked perfectly for me. Absolutely great and just how I imagined/hoped it would work!! The only issue is that I couldn't actually apply the patch automatically (I'm using TortoiseSVN) but by applying it manually everything seemed to transfer over so thanks!!
Setting the status of this to "reviewed & tested by the community" however if anyone has any issues with the patch then feel free to change it.
Hoping this can get adopted soon :)
#21
This worked fantastic for me also. As already mentioned, I needed to manually apply the patch, but that was probably more of an issue with my environment than the patch file. Thanks so much. This has saved me a ton of time.
#22
This patch #18 is absolutelly brilliant and perfect
This must be committed into ubercart.
Thank you very much !!!