MC,
I'm assuming that I'm downloading from the master branch and replacing the files that were updated 12 hours ago correct?
Printable View
MC,
I'm assuming that I'm downloading from the master branch and replacing the files that were updated 12 hours ago correct?
MC,
I installed the five updated files and did a test. For products with only physical attributes the entire process worked fine. For products which had a combination of a text attribute and a physical, the product added to the cart but in the cart it showed as out of stock. The product I'm working with has one physical attribute (color) with two choices and one text. The physical attributes are defined in the SBA table with quantities of 15 and 16. The main product has a quantity of 31. It doesn't make any difference whether the text attribute is defined in the SBA table. I added it to test with a quantity of 9999999 and it still displayed as out of stock in the cart. There is no indication what the quantities are for the attributes on the product page and in the cart. When I turn on the dynamic drop down it displays a pop up message on the product page saying all selections of attributes below this one are out of stock. There is no indication which attribute they are referring to. When I click ok and look at the attribute pull downs it shows the display only and text attributes as out of stock. There's no configuration instructions for the mod and it's new features so I may have something set incorrectly. If you need me to provide you with anything or do any further changes or tests let me know.
Not sure I fully understand the testing conditions of above, but I did go back to see if I affected the option to build a product with attributes where each attribute is added individually. It looks like overall, I changed something to prevent managing product that way. Also wasn't a condition I tested because I didn't think I impacted it.
I had been testing with a product of similar design one selectable attribute and one fill in the field attribute. The setup was though for each combination to be a variant:
Variant1: color X/text 15
Variant2: color Y/text 25
When I tried the individual variant perspective:
Variant1: Color X 15
Variant2: Color Y 25
Variant3: Text 99999
Didn't matter whether Variant3 was text or any other attribute type, I did something that prevented adding a combination like above to the cart... Will be addressing that "corner" of the code now that it has been identified.
Then I should be able to get back to the Dynamic Dropdown part so that it is more robust than originally designed. As for the "instructions" well, the idea is to actually match the functionality more with the existing description... All versions of SBA that I've used in the last 4 years have claimed to handle multiple attributes using the shoe or t-shirt example.... Potteryhouse/jeking were the first that I saw to actually come close to handling both multi- and single attributes in one, though they also mostly went with the version 2 above on variants... I don't use that version, but doesn't mean it shouldn't work.
What I'm getting at is that it really is still in a testing phase to know/understand what limitations and issues exist with it... The goal is pretty much open bore, but there are bound to be a few issues here or there...
The only attribute combination limitation that I know has not been overcome (yet) is such that a product has 3 or more attributes and the variants are built as combinations of 2 or more attributes paired with 1 or more attributes
V1: op_val1-1/op_val2-1
V2: op_val1-1/op_val2-2
V3: op_val1-2/op_val2-1
V4: op_val1-2/op_val2-2
V5: op_val3-1
V6: op_val3-2
Where each of the above variants (V1-V6) has a stock quantity associated...
As to quantities being displayed, well DD when coded to handle other types of attributes will offer some of that, as well as supporting other plugins such as dynamic updating, etc...
The above "abnormal" variants are something to consider in the future, but need to get through the other issues first. :)
Anything I can do to help just let me know. I'll PM you a link to the product I was referring to so you can see how it's working on a live site. Since it's a client's site I don't want to post it here. PM coming.
Huh, go figure:
At line 489 of includes/functions/extra_functions/products_with_attributes.php
Change:
To:Code:if (!$stockResult->EOF) {
$notAccounted = true;
}
(Removing the "not" (!) from the if statement.)Code:if ($stockResult->EOF) {
$notAccounted = true;
}
So couple of comments (fyi, was provided links to some "trouble" products), it is expected that attributes be setup as described in the FAQ where if an option name has a "please select" type option that it be marked as display only in the attribute controller. (If that has been done then I need to update the code to not populate the variants with such options or to not consider in DD.)
Secondly, in light of the current functionality and action necessary to fully incoporate the remaining capablity I'm thinking of adding a trigger in the tpl_modules_attributes.php file to disable DD for product that include attribute types not yet supported by DD, to be updated as the functionality is added. Therefore, overall SBA would work on a store, but some functionality would not be available for all product (namely at the moment customer facing added infomation (such as quantity available of a combination or other added "features"), but would still be able to interact with the shopping cart where applicable information could still be presented.
Yeah, wanted to be sure could get the product added to the cart first (fix provided above) then would need to apply the same fix to the includes/functions/functions_lookup.php file (ZC 1.5.3/1.5.4 line 252, ZC 1.5.1 line 255).
Afterall, if going to "make a mistake" then be consistent and make it everywhere right? :)
I'll update the three repositories and then will add the "disabling" feature soon.. Want to do it so that it will be easy to upgrade in the future. Need to identify the appropriate combination of DB, constant and code information so that it can be applied "easily" and consistently.. Not an ideal situation, but would support more of the production use of the code in its beta state.
Ie. was asked a while back to submit the code as a formal plugin to ZC; however, I felt that all/most of these multiple attribute issues needed to be addressed before formally submitting it. This may provide a stop-gap to that issue and make it possible for more formal use...
badarac, thank you for identifying this issue and for the additional testing in absence of clear direction. Before submitting will have to catch everything up to the current condition/status...
Also, looks like ZC 1.5.5 is nearing release, so need to grab any changes/issues and incorporate for its use... All the more reason to transition to using http://www.github.com/mc12345678/Sto...butes_Combined where installation and version maintenance has become a bit simpler... :)
Github updated to allow adding product to 1) check that the attributes of product being added to the cart are in fact defined by variants present (all listed as a combination in one variant or each attribute listed individually), 2) to manage at least the special cases of fill in the text and upload a file (welcome input if other attribute types are an issue), and 3) for product presenting a text field or upload file when Dynamic Dropdowns is disabled.
Next up, to support the code disabling dynamic dropdowns for the product that do not display accurately for the attributes applied to the product to allow maximum use of the features while development continues to make the dynamic dropdown part more robust.
Alright, added a function that when fed the appropriate attribute data can determine if dynamic dropdowns should be able to be shown for a product even if DD is turned on for all product. The function can be modified/customised to turn off DD under other certain conditions; however, that seemed to be the basic reason.
As dynamic dropdowns are made more "flexible", the limitations in that function will be reduced, but until then...
Have fun... :)