Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a theoretical bug, nevertheless I think it should be fixed:
If you configured the price table to not hide the default price, this module will make this field accessible even if it has been hidden by another hook.
Comment | File | Size | Author |
---|---|---|---|
#3 | commerce_price_table-dont_make_default_price_visible-1897828-3.patch | 888 bytes | Cybso |
#1 | commerce_price_table-1.1-1897828-rt1.patch | 1.24 KB | Cybso |
Comments
Comment #1
Cybso CreditAttribution: Cybso commentedChanges to loop in commerce_price_table_form_commerce_product_ui_product_form_alter(). #access will be only set to false, but never to true.
Comment #2
pcambraAs mentioned in the other issue, patches should be provided from module root.
Why are you adding a default price to 0?
Also, entity_metadata_wrapper is nicer for this things instead of accessing the properties directly
Comment #3
Cybso CreditAttribution: Cybso commentedThe default price value change is taken from http://drupal.org/node/1823012#comment-6903034. As mentioned in the other issue, I rebuild the patch based on akalata's work for ief integration, and separated it later. I assume he added this because commerce_price must not be empty, but if it is hidden the user cannot enter a value into it.
I've tested it without this change and it works fine for me, so let's remove this part until a bug report is created about this.
Comment #4
pcambraFixed, I don't think we need to set the price to 0 in any case...
Thanks for the hypothetical catch!! :)