Quote Originally Posted by crankyjim View Post
Hello all.

The site in question is my wife's site. I did the custom coding necessary to display the stock on hand.

There is no module available that I am aware of that replicates this functionality.

For those of you technically minded, it is really just a matter of filling two multi-dimensional arrays and looping through them to write out the html required for the table.

The first array is filled with the attribute type names and becomes the column heading contents.

The second array is filled with the attribute value names and includes the quantity as a final element within each array row.

The most difficult part of this was calculating the correct nested loops to ensure that we would always have only 3 "columns" of information and it would be limited to a maximum of 30 items per "column".

The display itself is rendered as an html table and is styled using css.

Hope this helps get you started.


Jim
Hey crankyjim - are you still around? I am going to modify the 'Stock By Attributes' mod to solve this problem (well, I'm going to give it a go!!). It sure does sound like it would be helpful to have a look at your code... would you mind?

Not sure when the next release of Zen Cart is planned, or if there are guidelines for making mods compatible with future versions? If so, now would be a great time to find out, so I don't have to re-write everything in 6 weeks...!

Cheers,
Pat