Thanks to some testing performed by mattys, it was identified that there was an error in the zen_get_products_stock function for when a product had multiple attributes that were grouped together as mixed attributes, and that a specific variant of the group was set to a quantity of zero, then the variant did not show out-of-stock even though there was no product.
After some testing, specifically identified, the following situation:
When a product had two attributes,
- one with 3 values the other with 2
- the attributes are added as a combination (a, 1; a, 2; b, 1: b, 2; c, 1; c, 2)
- If the combination of a, 2 is set to zero, then when displaying the product on the store side, the total quantity of a is displayed instead of the expected value of zero.
While a minor fix for that one thing, the branch(es) I started of SBA 1.5.4 have been updated to contain all of the latest fixes and streamline the various corrections into the master branch. The readme.MD file now indicates that it is compatible with both ZC 1.5.3 and ZC 1.5.4. The place to go to see these is:
https://github.com/potteryhouse/stoc...ttribute_1.5.4.
Working on bringing all of the fixes and capability of SBA 1.5.4 to SBA 1.5.3 so that those still using ZC 1.5.1 can also have the same benefits. The files have been locally setup and appear functional, now trying to compare the files to a fresh install so that the number of changes necessary in a merge are minimized. Identified a few minor improvements to apply to SBA 1.5.4 that will also minimize some of the core file changes as nice as it would be to make this more of a core program. :)
For what its worth, it is now possible (in SBA 1.5.4, soon to come to SBA 1.5.3) to populate multiple attribute product either by combined attributes or as multiple single attribute variants, but not yet a combination of both. Some thinking needs to be applied before using the multiple single attribute approach as it may not make sense to populate in that fashion and may cause inventory tracking issues. It may also make a lot of sense for some. One use might be something like: flowers are being sold, with or without vases. At the moment a quantity of vases as well as a quantity without vases would need to be populated (Hadn't programmed yet the possibility of one attribute option being used for inventory while the other not). But basically, vases would be populated for the product as a total number of vases (for that product), and the number of flowers of that flower type would be populated. But the inventory would not need to be set such that there were x flowers with vase and y flowers without vase, but there would need to be x flowers, y vases, and z non-vases (which would be suggested to be the same value as x flowers or larger). The code will determine the maximum number of product combination based on the minimum quantity available of each of the attributes, hence the need to ensure that the quantity of non-vase options equals or exceeds the number of flower options. This is just a single scenario and there are many others to consider. Additional coding will continue to address this and several other options and features.
Bookmarks