[ic] Matrix options inventory -- yet again.
reid at vianet.ca
Thu Dec 4 15:13:26 EST 2003
> I know Mike Heins did a patch for the 4.8.3 version some time back
> when I was looking for an easy way. You might want to look at that
> here: http://www.icdevgroup.org/archive/interchange-users/2001/msg12003.html
> and that worked fine except if I remember, you could end up with a blank
> drop down if no item options had inventory.
I saw that too, but I guess I ASSuMEd it was already included. But then
I never really tried it! *ducks*
> Recently if an item has matrix options, I do a quick row count to make
> sure there are options available for that item. If not, don't display
> and the buy button and direct them to out of stock notification system.
> If so, just build our own drop down with a query, containing only those
> options that inventory.
> [query sql="select options.code, options.description from options LEFT
> JOIN inventory ON inventory.sku=options.code where inventory.quantity > 0
> AND options.sku = '[ITEM-CODE]' ORDER BY description"
> <SELECT NAME="mv_sku">
> <OPTION VALUE="[sql-param code]">[sql-param description]
> THAT, I'm certain can be cleaned up, but it works for me and too
> busy to mess with something that works. Hopefully this is a good
> starting point for you. Maybe someone has a cleaner way of
> getting it done.
This is mint, I'll check it out!
Thanks much Jerry!
More information about the interchange-users