Joined drupal.org for more than 2 years, but working in web dev for a long time, now I'd like to start to contribute my modules to the community.
The current completed module now is "Übercart CCK Attribute".
I got a lots of requests from community, my colleagues and myself, about an auto-generated Attribute options for Übercart 2.x.
See these threads:
http://drupal.org/node/443926
http://drupal.org/node/298361
http://drupal.org/node/333085
While current Attribute mechanism is manually data input, my attempt is making a way to connect between CCK Options and Attribute Options.
Übercart API allows us to do that smoothly.
I wrote the module with Drupal standard in mind. Using Coder helper tool to clean up the code. Install file for installing and uninstalling an additional DB table schema.
Please review and provide me the application issue queue for uploading my work.
Regards,
Trung
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | uc_attribute_cck.tgz | 7.33 KB | trungonly |
| #20 | CCK attribute in View.png | 11.98 KB | fadiwissa |
| #19 | uc_attribute_cck.tgz | 9.11 KB | trungonly |
| #10 | uc_attribute_cck.tgz | 5.23 KB | trungonly |
| #7 | uc_attribute_cck.tgz | 5.23 KB | trungonly |
Comments
Comment #1
trungonly commentedI'm adding attachment of the written module (uc_attribute_cck.tgz).
For your better imagine, I put here also some screenshots:
Comment #2
binhnt commentedthat is great module! I thing it is very usefull for all people used ubercart!
Thanks!
Comment #3
trungonly commentedTag for Ubercart related module.
Comment #4
avpadernoHello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site; for modules, it should include also a comparison with the existing solutions.
What is the difference with http://drupal.org/project/attribute?
Comment #5
trungonly commentedGreat.
There is no existing solution for current releases (2.x, 3.x) of Übercart.
- For your quoted competitor module:
http://drupal.org/project/attribute
Based on its related categories (Content · Content Construction Kit (CCK) · Content display · Views) and the description, I see this is not a module for Übercart. This is actually a plain CCK widget field. Users cannot use it for Übercart Attributes for Product, Cart and Order template.
Also, I cannot download it for deeper review, it says 404 not found right now.
See these outstanding issues:
#443926: Move product field ordering to standard field display management
#333085: Field weight order using CCK interface (attempted to patch)
#298361: Attributes -> CCK fields?
- There are plenty of people who need this request, but found no solution.
- The maintainers of Übercart mentioned that CCK Attribute will not be done officially in Übercart 2.x:
And in Übercart official 3.x roadmap (if time permits):
As per issue introduction, this module would be a replacement, independent (or working in parallel at the same time) with the core Übercart Attribute module. The advantages of (Übercart) CCK Attribute are:
The disadvantage (currently) compared to the origin Übercart Attribute module is that, because of rich data the Options returned, it is not easy to manually set Price/cost/weight, Adjustment or Stock (yet). It could be solved specifically with Node Reference field type, by assigning specific node fields for Price/cost/weight, Adjustment or Stock (potential in next release).
I described everything in the README.txt file inside the module directory. That include introduction, instruction for how to install and configure and use. If you have not installed the module yet, please take a look at the README.txt file in the attachment.
Cheers,
Trung
Comment #6
avpadernot().Comment #7
trungonly commentedThanks for quick check.
1. I removed the License file. (I got this license file from the Ubercart module, that's just a clone of GPL from Ubercart).
2. I removed the
t()now. (The menu title I got from the Ubercart Attribute module, with title passed tot(), yes this is not good).3. The schema description is just a clone of the core Taxonomy module. Yes they are not passed to
t()already.4. I used the Coder helper module to find out errors. Read again the Coding standard specially in "Naming Conventions" section, found no mistake. Check again the recipe "CVS applications review, what to expect" and refine some - like you suggested. I believe I applied all experiences got from the recipe above. If you see anything buggy please kindly tell me!
I fixed also an issue about variable reference reported privately to me by fadiwissa.
Comment #8
fadiwissa commentedThanks a lot Trung for the very quick update.
The warning message disappeared from the Product CCK Attribute tab.
However, I now see the same error message when I add a product containing a CCK Attribute to the ubercart cart.
Warning message: "warning: Parameter 1 to uc_attribute_cck_add_to_cart_data() expected to be a reference, value given in .../includes/module.inc on line 483"
and "warning: Parameter 1 to uc_attribute_cck_product_description() expected to be a reference, value given in .../includes/module.inc on line 483"
Would really appreciate it if you can resolve that.
Thanks Trung,
Fadi
Comment #9
fadiwissa commentedTrung, one more very useful feature would be the option to make the Product CCK Attribute required.
Thanks again,
Fadi
Comment #10
trungonly commentedThis pass by reference warning is not happened in my server, so I cannot check it by myself. I modified all possible parameters into value, not reference anymore. Please check.
Comment #11
trungonly commentedDid you check the "required" option on CCK field configuration?
Comment #12
fadiwissa commentedMy bad, like you mentioned checking the "required" option on the CCK field configuration works....
Comment #13
fadiwissa commentedThe updated version you uploaded in post #10 resolved the last of my warnings.
Thanks Trung... great work.
Comment #14
fadiwissa commentedHey Trung,
One final modification would make this module super useful IMHO - If you can make the product summary (in the cart) display the CCK Attribute value.
For example, if I selected product "X" and attribute value "Y", it would be great if I can see it as "X(Y)" in the ubercart cart.
Do you agree?
Thank you,
Fadi
Comment #15
trungonly commentedI checked all steps in the cart are displaying the pair Label: Option correctly (See screenshot "cck-attribute-product-cart-with-formatter.png" in post #1). Could you please tell me what cart step and screenshot of the page which is missing info.
Comment #16
fadiwissa commentedThanks Trung.
It's working now. Unfortunately I'm not sure what I was doing wrong, but I believe it's probably related to the display settings of the field I wanted to display.
Thanks again,
Fadi
Comment #17
fadiwissa commentedHere's another recommended feature: exposing the custom attribute stored through a CCK field attribute to the view module...
This would enable module users to create a view displaying the orders along with the custom CCK field(s) value(s).
I have used the "Ubercart Views" module (http://drupal.org/project/uc_views) to expose UC_Order fields... but the "data" field where you're storing the information (as far as I can tell) is not exposed.
I'm guessing that's because the data field by design is maybe meant to contain unstructured data that the use decides to capture with the order...
Thanks again for an incredible module...
Fadi
Comment #18
avpadernoComment #19
trungonly commentedYes for your feature request I've made a View handler for CCK Attributes. The data structure of CCK Attributes is differ from original core Attributes, so you cannot use existing
uc_viewto handle CCK Attributes. It needs a new handler.Since my View handler requires
uc_viewas dependency (I do not reinvent the wheel), I must split the View part into another separate sub - module. You please enable this sub - module if needed: Ubercart CCK Attribute Views.Then choose the View field in group "Order product: Product CCK attributes".
Tell me if it suites your need or do you need anything else.
Note - this version is just a development release to collect your feedback. I need to refine & work on the filter part. So I'm making Status to needs work until final version (shortly now).
Comment #20
fadiwissa commentedGreat work Trung.
I am now able to use the CCK fields in a view.
Two comments: It would be great if the user can specify which of the multiple CCK fields I want to show in a given column field (camper name vs camper age in the attached screenshot).
It would also be great if the user can filter/sort by a given CCK field.
Thanks Trung,
Fadi
Comment #21
trungonly commentedThis is the final improvement in Views support.
- View Fields:
- No filter / sort implemented. I will back to it later when possible.
Please any CVS administrators review and approve my proposal. Thank you.
Comment #22
avpadernoThat line needs to be removed as it is already added from the packaging script, and it would cause problems to the update manager that would not understand which one is the project name, and could not verify if there are updates for the module.
Thank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #23
trungonly commentedThanks for closing issue, I removed the line as you explain.
Comment #24
avpadernoComment #25
trungonly commentedThis's the 1st time I'm playing CVS stuff here.
It goes live now: http://drupal.org/project/uc_attribute_cck.
Comment #28
avpadernoComment #29
avpadernoI am giving credits to the users who participated in this issue.