thank you jettrue!!! I will definitely send you chocolates if youd likeIm glad someone got it working, I was leaving out the single quotes I think and therefore getting a blank page. sigh.
thank you jettrue!!! I will definitely send you chocolates if youd likeIm glad someone got it working, I was leaving out the single quotes I think and therefore getting a blank page. sigh.
Do you guys only have single-attribute products? Or am I missing something? As far as I can tell, the greyson, et al. mod for showing stock levels (culminating finally in the drop down fix by jettrue) will not work with multiple attributes and, I think, would in fact break your code if you did have multiple attributes.
Eg in case i'm not clear:
Red T-shirts: 5 units (ok)
Large T-shirts: 5 units (ok)
But...
Large, Red t-shirts: ???? (not ok)
- Steven
I only have single attributes (colors) for my products
Correct, it only works with one attribute option, I just tested it.Originally posted by s_mack@Feb 27 2006, 01:37 PM
Do you guys only have single-attribute products? Or am I missing something? As far as I can tell, the greyson, et al. mod for showing stock levels (culminating finally in the drop down fix by jettrue) will not work with multiple attributes and, I think, would in fact break your code if you did have multiple attributes.
Eg in case i'm not clear:
Red T-shirts: 5 units (ok)
Large T-shirts: 5 units (ok)
But...
Large, Red t-shirts: ???? (not ok)
- Steven
I'd love to use your new way of handling it, as long as it'll work on all of the newer browsers. It seems to work fine on Safari and Firefox over here. I tested it with Javascript off, and as long as it's still allowing them to add to cart (and if there's not enough instock they get the message in the cart), works for me!
However, even with it limited to 1 attribute is a great improvement over the default zen cart behavior... and I love having the availability listed in the drop down. :-)
I only have single attributes.
? he seems to have it working for 2 different types of attributesOriginally posted by s_mack@Feb 27 2006, 06:35 PM
the beauty of this contrib vs. the other one that's out there because it DOES work with multiple attributes... that modification, unfortunately, does not.
.......
see it in action here. I'm constantly working on it so ignore the layout and crap - just see how it shows you the number of that combination in stock and changes the (meaningless) graphic above it.
Yes voltage... my way of doing it will work with unlimited attributes (well... i suppose there's a conceptual limit somewhere) using JavaScript.. completely different method than Grayson's way so they can't be used together.
As I have it now, it is NOT documented, ONLY working for drop downs (cause that's all I use) and probably isn't coded correctly for everyone's use (I probably got lazy and hardcoded table references and if you use table prefixes then the code will break).
So if you guys like my implementation and want to use it, I can clean it up and try to make a sensible release out of it but it will take a bit. If you are happy with the single-attribute method, then stick with Grayson's because it is FAR less complicated and doesn't rely on JavaScript support.
As jettrue pointed out... if a browser doesn't have JavaScript it simply won't show you the stock levels or show/change the stock status image. Whether or not it allows you to add it to your cart and/or show you out of stock once in your cart depends on your zen cart config settings.
Worst case scenario: Your cart is set to NOT allow out of stock items be added to the cart AND your visitor doesn't have JavaScript (<1% of browsers) then the page will just reload when they hit "add to cart" with no errors, warnings, explanation, or anything else. That's a flaw with ZC really, not my mod.
- Steven
Steven
First of all many props to those who hvve worked so hard on this contrib. ::tup I am going to start working with it tonight.
I'd actually like to get that contrib if you don't mind.
Great looking site by the way.
Thanks
I came here to learn. I left here wiser.
Great contrib. Got it working on the first try![]()
That's a first for this newbie.
Question: Is it possible to use this so that even if you have mroe than one attrib for a product yuou can select which attribs to include in the stock level?
ie I wouldlike to be able to select one attrib out of four that I have to track the stock level. I have attribs that don't necessarily belong to the item but are general to all products.
Our customers can choose to have an item gift wrapped or gift boxed at an additional cost, choose a bow color and insert a free gift message These are available to all products, sizes etc.
The problem I am having is that when I try and create a stock quantity for a size let's say it takes into account the gift box attrib as well as the bow color, gift message...you get the picture.
Does anyone know of a way to maybe create an on/off switch for each of the attribs so you can include or exclude it? I can give it a try (although php is new to me) if someone can point me in the right direction.
I came here to learn. I left here wiser.
That's a good point seizer... I hadn't thought of that, but I can see how a lot of carts might work like that... have attributes that really don't affect stock at all.
I don't think it would be too terribly difficult. I'd add a column to the products_attributes table (eg. products_attributes_checkstock) and make it binary, then edit the PWAS (this) mod with a simple if (products_attributes_checkstock == true) condition. I think that would work.
- Steven
Bookmarks