The Ubercart system, unlike the Ecommerce system, manages subproducts and their attributes without creating separate nodes for each subproduct. This is highly desirable in terms of its extensibility and ease of maintenance, but it also makes it impossible to filter views based on the existence of or stock levels of subproducts with specific attributes.
I am trying to make an apparel store. Products have two attributes: Type (ex. Men's T-Shirt, Women's Tank Top, etc.) and Size (Small, Medium, etc.). My first inclination was to setup a method that links taxonomy terms to attribute options that are defined and are in stock. This is problematic because hierarchical taxonomy is not exclusive.
For example, suppose that I have a specific t-shirt that is available in Men's and Women's Small through Extra Large, but has sold out in Men's Medium. If I filter by taxonomy terms Men's and Medium, I will get that shirt even though it is not available in this specific combination because there exist separate subproducts with each of those attribute options.
An implementation of Hierarchical Select would be ideal for this type of stock chart. Type and Size would each be a drop-down box, and when submitted the view would search the list of subproducts for one that contained each of the specific attribute options selected (and that, optionally, had that specific subproduct in stock).
Ubercart is shaping up to be a powerful and popular e-commerce solution, and an implementation like this would be both a great use for hierarchical select and a substantial asset to Ubercart users. Is this something that others would be interested in?
Comments
Comment #1
wim leersIt sure sounds very interesting! :) I'll gladly review your code, whether it'll be as a patch for the Hierarchical Select module or as a separate module.
Comment #2
richfarr-1 commentedI'm also interested in a similar solution. My current coffee inventory list includes the following attributes: size, roast and grind. I need a way to discontinue a combination of these attributes. For example, I need to discontinue a 5lb dark bean coffee while still being able to sell a 300g size of the same.
Comment #3
wim leersIt seems to me what you want is faceted search? See http://drupal.org/project/faceted_search
Comment #4
wim leersThe evolution of this issue will depend on the answers at http://www.ubercart.org/forum/development/5335/hierarchical_select_uberc....
Comment #5
wim leersAs per that forum topic at ubercart.org: this is postponed to the D6 port!
Comment #6
niklp commentedNeither this implementation nor faceted search will work with attributes because they are not driven by taxonomy (at least in D5).
It really NEEDS to work though. The above suggestion (HS) and FS are both fantastic features for a commerce website.
Comment #7
wim leers1) What's "FS"?
2) Taxonomy is not related to this.
The D6 version of Ubercart will have hierarchical attributes (as you can read in the aforementioned link) and will therefore be able to use HS in a meaningful way.
Comment #8
niklp commentedFS = Faceted Search (1), as mentioned in previous post (should have CAPPED it). FS requires taxonomy to work (2), and therefore attributes can't be displayed via that method.
Are you saying that HS is table independent...? Probably not, I suppose.
My point was, that if UC attribs convert to using taxonomy-based storage, we can use FS and HS no problem, which would be TOTALLY SWEET.
Comment #9
wim leersWell, that first sentence is not quite a beacon of clarity in English language… you should have written that more clearly, especially because FS is not a widely used module (yet), so it's likely that people don't know what you mean.
1) Then FS should be rewritten to support any kind of metadata, hierarchical or not. This is not a problem that Ubercart should solve.
2) What's "table independent" supposed to mean? That it can work with any kind of underlying table, as long as it's the same as Taxonomy's? Then no, it's not "table independent". It's hierarchy-independent. You could have read that in API.txt or even by just looking at which modules are supported: the Menu module for example is most definitely not similar to the Taxonomy module when it comes to the db schema, or as you say it, the "table".
3) Your point is irrelevant here. You should post this as a feature request in the Ubercart issue queue.
Comment #10
bombayhustle commentedRelated Question - How do you actually set different stock levels for the different attribute options? i.e. in your apparel store, setting a stock of 10 Mediums and 15 Larges...?
Comment #11
wim leersThat's a UC question. It shouldn't be asked here.
Comment #12
wim leersComment #13
finex commentedWill HS for ubercart attributes be available? Thanks!
Comment #14
wim leersNo. UC doesn't support hierarchical attributes yet. Once UC has that, it's just an hour of work or so.
Comment #15
moshebeeri commentedit seems to me that there is an other solution to this if Taxonomy vocabulary could be used as a Content Type it could solve the problem,
then using Taxonomy the same way that Ubercart uses category.
Comment #16
jpstrikesback commented@Wim Leers
Can this be active again based on the following?:
http://www.ubercart.org/forum/development/5335/hierarchical_select_uberc...
Comment #17
wim leersWell, if that module can work, then HS can work too, and likely far more efficiently. Just implement HS' API (see the included API.txt), that's it!
Recently, a Hierarchical Select Node Reference was released as a separate module, and so should this.
HS has the API. Dependent Attributes has a sample implementation of how to generate a hierarchy of the attributes. All the required pieces are ready now :)
Comment #18
mghatiya commentedJust wanted to check if this working now.
I saw an active website using this: http://www.ubercart.org/site/14287#subscriptions
Any updates? I see HS is still valid only for Drupal5
Comment #19
wim leersA Drupal 6 development release is available and works, so it's valid for D6 too. I'm not sure how exactly that site does it.
Comment #20
ahimsauziHi Wim,
This module is what I have been looking for! Thanks for all the work. I just installed and got an error on Hierarchical Select Content Taxonomy Views (This version is incompatible with the 6.14 version of Drupal core.) Is there any modification I can make to make it compatible. A few module has a simple .info changes to make everything work.
Comment #21
wim leers@ahimsauzi: see #555418: Hierarchical Select Content Taxonomy Views Integration.
Comment #22
ahimsauziThanks for a quick response Wim. I am subscribing to both.
Comment #23
virtualdrupal commentedSubscribing
Comment #24
wim leersMarking as postponed once again, due to lack of interest (once again).
Comment #25
panthar commentedFor the record, I am in interested in this, and think this could be one of the best possible additions to UC.
Subscribing.
Comment #26
kaianine commentedi'd also be very much interested in this... and willing to put in the development time to get it to work. i'll start digging into the HS codebase, and see what i can find. if anyone (Wim?) has any hints for me for where to look, or a short list of changes that need to be made for this to work, please let me know.
i'm developing a ubercart website that would need this functionality to be complete, so i'm diving in right away. any help or direction would be greatly appreciated.
Comment #27
wim leersHS itself doesn't need to be changed: handling the UC attributes use case is not a problem. Look at example implementations in the "modules" directory and at API.txt to find out how to use the HS API.
Good luck! :) Let me know if you need any more help!
Comment #28
panthar commentedkaianine,
I would be willing to help you with development of this, PM me if interested. NOTE: I would be just as lost as you, so I can't really provide any pointers, but I could help ease your development time.
Comment #29
wim leersComment #30
summit commentedHi,
As I understand this thread correctly, Wim wil not build the UC-HS bridge (status won't fix), but because the modules: http://drupal.org/project/uc_dependent_attributes and http://drupal.org/project/uc_aac are there, he is looking for a taker to build the bridge between UC and HS. I am not a programmer, but are willing to test.
Anyone for the job please? May be the best way to add HS support to uc_dependent_attributes as explained in http://www.ubercart.org/forum/development/5335/hierarchical_select_uberc...?
greetings,
Martijn
Comment #31
bsandor commentedSubscribe