@blag
The code for your add to cart buttons with attribute and without are correctly identical apart from the product id. No stock id is added or needed at that point.
To jump from noticing that the problem occurs only with products who have attributes to assuming that it must therefore be a problem with stock by attributes is too big a leap. Stock by Attributes is just a small part of the attributes processing and setup and I wouldn't rule out other possibilities based on what you've told us.
That said Stock by Attributes would be the first place I'd look too. The reason is because there isn't a Stock by Attributes for Zen Cart 1.3.7.1. The last version 4.4 was re-tooled specifically for Zen Cart 1.3.7 and because it affects six core files that tend to change in every release, needs to be re-tooled each tool. Three of those six files changed in between 1.3.7 and 1.3.7.1, so there's a fair chance that's what's causing your problem.
I haven't reviewed those changes, and you haven't told us specifically what happens when you try to use the button or provided a link, but if I had to guess, I would suggest looking first at the includes/modules/pages/shopping_cart/header_php.php file.
Bookmarks