Attributes, Options, osCommerce

In standard osCommerce, the product options system (aka attributes) is almost completely useless. The reason for this is obvious – attributes cannot be linked together to make a meaningful "sub-product".
Eg:
T-shirt – 12 in stock, of which:
3 are blue, large, round neck
4 are red, large, v-neck
2 are blue, small, round-neck
3 are blue, xxl, round-neck
In that example, you have only 1 product, but you need to set up "colour" (red and blue), "size" (s, l, xxl) and "style" (round neck, v-neck). In the standard attribute system, this will give you three dropdown menu's showing the available options. Follow me so far?
What it means is that a potential buyer could choose a bunch of options that are simply not available – example: xxl, red, round-neck. And they would be able to check out. When they check out, overall stock is reduced by 1 bringing your number of available shirts down to 11.
But you have just sold something that does not exist…are you with me?
OK, so there are some steps you can take to combat this:
1. Install something called "QT Pro" – which is PITA to install and has many bugs.
2. Install "Master and Slave Products" – which is easier to install, but also has problems – it's ubnwieldy in real life use.
Here's my idea for a rework of the attribute system…
1. Allow the store owner to insert options as per normal.
2. Have an extra "options" page which will allow the store owner to make "attribute sets" (explanation below)
3. Assign these "attribute sets" to products.
What is an attribute set?
In the example above, this:
blue, large, round neck
is an attribute set. The store owner would link 3 options together and be able to insert the quantity available. He would also be able to give the "set" a SKU.
Then, in the product_info page, SKU's would be shown, like this:
T-Shirt
Description, blah blah
In stock:
( ) blue, large, round neck [SKU: qwerty123] – 3 in stock
( ) red, large, v-neck [SKU: qwerty124] – 4 in stock
( ) blue, small, round-neck [SKU: qwerty125] – 2 in stock
( ) blue, xxl, round-neck [SKU: qwerty126] – 3 in stock
[ BUY NOW BUTTON ]
Now, the next part of this modification, would be subtracting stock, this would be done in two stages. Let's say the buyer purchases 1 of "qwerty123". The overall stock of t-shirts would decrease from 12 to 11 and the stock of "qwerty123" would decrease from 3 to 2.
How does that sound? Can any of you see any flaws in my thinking? Anyone got any ideas to add to this?





Hi Gary,
This is exactly the problem we have with our stock. Is this something you have started or just in your thoughts at the moment? The only way round it at the moemnt is to create multiple products so customers cannot order colours/sizes not in stock.
Do you know of a cleaner (i.e not contribs that are a PITA or have "issues") that do the second part of your explaination
I have 1 product in 6 colours, of which I have 6 of each in stock. I want to list 1 product with 6 colour options with a stock level for each sub product as above – is there a more sinple contrib to handle this yet or do you have something in developement?
Cheers
James Robertson
http://www.llamafairtrade.co.uk
(happy user of the clubosc coupon contrib)
Comment by James Robertson — January 16, 2009 @ 10:01 am
James
This is something I have in my head at this moment. I know that it would be a good way to do things. It's a case of finding the time to code it up.
There are NO good contributions that can keep track of attribute stock in a simple, yet workable way.
Comment by Gary — January 16, 2009 @ 12:00 pm
How do you see it in your head – how much work do you think would be required for a basic first step along this soloution??
Cheers
James Robertson
http://www.llamafairtrade.co.uk
Comment by James Robertson — January 20, 2009 @ 3:40 pm
I think my idea is not a great deal of work, but it's going to take a lot of thinking about as it's basically a whole new way of subtracting stock (which obviously needs to be right!). I guess it would take a few days of coding and testing, which I never have, other than in patches of an hour here and an hour there.
Comment by Gary — January 21, 2009 @ 10:28 am
I installed QTPro on my dev site and, while it works, its a real bugger to install – also it doesnt give a new SKU to the combination which is an issue for me as my suppliers have seperate skus for every combination so when I come to order its a very manual process! This sounds like the business though!
Comment by Jase — January 28, 2009 @ 12:46 pm
A start has been made on this, but as with all my ideas, they took a backseat to work that puts food on the table.
So, I guesstimate this might be available in some form or other sometime soon. Hows that for non-commitment
Comment by Gary — January 28, 2009 @ 8:47 pm
I think the best way would be to treat all the different options as individual products. This way quantity for all "options" can be kept track of. The trick would be getting multiple products in a drop down menu on the product page and getting it to post correctly to the shopping cart page. Perhaps an extra field could be added to the product info database column to indicate weather or not the product has mutiple options. This way the drop down menu could be correctly populated in the product info page.
Comment by smoky — February 16, 2009 @ 3:44 am
Forget drop down menus
How this would work is by Radio Buttons based on SKU, with the quantity decreasing on each successful sale.
This way you are not populating your database with "false" products and you are keeping the customer interface nice and clean and easy to understand.
Comment by Gary — February 17, 2009 @ 2:19 pm
I believe you could do this with the extra fields contribution. You can setup a couple of extra columns to specify a model or sku and another for the stock qty, then setup the stock accordingly to be subtracted for each sale in the checkout_process.php.
The real issue comes up if you need to have nested fields so the customer can select the product options quickly. Radio buttons can be useful for few options but for many I would deploy drop-down lists. I had real problems setting this up on some stores, because of the complexity in terms of hierarchy to develop modules that could accommodate the product options linking properly when nesting was necessary. Then I had different requests for stock numbers, images, jscripts on the product info page and so forth that makes this kind of integration difficult especially because I am trying to support both script and noscript cases.
If you have just few options per product and no nested options are necessary then the product extra fields contribution can easily modified to do that.
References:
http://addons.oscommerce.com/info/2202
PS: You can see screenshots of an implementation if you search my site for "multi level" or "group fields"
Comment by enigma1 — February 27, 2009 @ 11:36 am
EN; it would be a simple matter to not use radios if the number of SKU's was a large amount. I still haven't really got past the theory stage of this mod yet – I have a flowchart of what I envisage, and changing from radio to dropdown is an extra couple of lines of code – good idea though, cheers.
Comment by Gary — February 27, 2009 @ 11:47 am
Magento does this very well but is a beast and slow. I too am looking for a way to do this with osCommerce.
Comment by Stephan Miller — October 18, 2010 @ 3:50 pm
hi gary
did you ever finish this and have it lying in a drawer for sale?
regards
Michael
Comment by Michael — January 19, 2011 @ 10:58 pm
Hi Michael – never really got much past the theory stage. I did ask a very well known osCommerce coder to quote on it for me, but he never got back to me. I would like to get it done, but it's finding the time to do it. If I ever did get it done, I know it would be very popular.
Comment by Gary — January 19, 2011 @ 11:03 pm
damn
ok – i'lllook around then. thanks
Comment by Michael — January 19, 2011 @ 11:20 pm
I would second that, Gary. I have a client now that has a shoe store and needs to link the attribute of color with size since some sizes are not available in all colors. She is having to enter separate products. If someone had the time to develop this I am sure there would be plenty of customers lining up to buy it. Email me if an when you do.
Mayda
Comment by Mayda — April 1, 2011 @ 1:57 am
Hi Mayda
It's such a departure from normal osCommerce so it would take too long to code and test. It would most liely sell very well though.
Comment by Gary — April 1, 2011 @ 7:54 am
The last version of master products adapted to 2.3.1 works fine for me. Much better than using attributes. Attributes are one of the biggest flaws in oscommerce.
Comment by Luca — April 20, 2011 @ 10:33 am