Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Okay, so maybe I get it now also. But first, a minor correction to the above statement so that readers are not 100% confused. :P The first example showed a product with multiple attributes (option names) each listed individually, but is still a multi-attribute product. This aspect of identifying a product was only recently realized but was a "feature" that seemed like potteryhouse/jeking intended. As a result of this recent discovery, there are some aspects of the code that need rework to accomodate appropriately.
Now the part that I get:
All product identified with 0 quantity, where multiple attributes are added as a combination with the expectation that out-of-stock is turned off are still showing one such combination with the condition of displaying the undesired out-of-stock aspect.
I do think I remember seeing the logic to possibly cause that response and at the time I didn't see the need to address it. How short sited I was... Will add this to the list of "fixes".
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I believe I found the solution for the popup message appearing when using sba_sequenced_dropdown even though the goal was to not have it appear when the stock was 0 and using DD.
I'll post the changes necessary in a little while, but it was "unfinished" coding that resulted in the message persisting even though other options are turned off.
The fix is to be applied to: includes/classes/pad_sba_sequenced_dropdowns.php
And another menu option to be added to the Dynamic Dropdowns configuration menu to control the popup. This will offer the store owner to modify the activation of the popup with whatever content is desired. I will need to see what code is not incorporated that is causing the line below to display as the version I am using doesn't do that
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
So, mc12345678, the link you posted in post #2201 should still be the correct link once you get the above fixes in?
Mal.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Malaperth
So, mc12345678, the link you posted in post #2201 should still be the correct link once you get the above fixes in?
Mal.
For users of ZC 1.5.1, yes the link in https://www.zen-cart.com/showthread....15#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to https://github.com/potteryhouse/stoc...ttribute_1.5.4
The more recent one tends to be updated first to potentially support the largest audience. I have to add in a script to remove all readonly attributes without deleting every record before I upload the patch to the display issue when using sba_sequenced_dropdowns with multiple attributes. Hopefully tomorrow will have everything in place.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
For users of ZC 1.5.1, yes the link in
https://www.zen-cart.com/showthread....15#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to
https://github.com/potteryhouse/stoc...ttribute_1.5.4
The more recent one tends to be updated first to potentially support the largest audience. I have to add in a script to remove all readonly attributes without deleting every record before I upload the patch to the display issue when using sba_sequenced_dropdowns with multiple attributes. Hopefully tomorrow will have everything in place.
Makes sense to me. :) I will wait until you have udpdated the 1.5.1 compatible version before downloading again since, at least in appearance, that multiple attribute issue is one I am having also. I've waited this long even while noone was actively working on the plugin, what's another day, or week, or month for that matter? ;) Thank you again for your efforts on our behalf!
Mal.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
For users that have previously installed SBA that included the install of Dynamic Dropdowns, the "upgrade" using the files currently available as described above can be performed by replacing the files and then running the following query in the admin->tools->Install SQL Patches window. If run from phpMyAdmin, will need to ensure to include the table prefix for the tables in question.
Code:
SELECT @configuration_id := configuration_group_id FROM configuration_group WHERE configuration_group_title='Dynamic Drop Downs' LIMIT 1;
INSERT INTO `configuration` (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order,
date_added, use_function, set_function) VALUES
('Display Javascript Popup for Out-of-Stock Selection',
'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK', 'True',
'Controls whether to display or not the message for when a products attribute is out-of-stock.',
@configuration_id, 45, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');
Installation as a new product, will perform/incorporate the above, so there would be no need to perform it for a new install and if run on a new install would cause an error (Didn't rewrite the insert to ignore an error) also, if 'Dynamic Drop Downs' is not found, the @configuration_id will be a 0 value and will not appear in the Dynamic Drop Downs configuration menu option but would appear when looking at the configuration menu for the 0 id. Absence of the above when the updated files are in place will result in the javascript popup appearing as if the javascript popup had been enabled/set to True.
The updated files also include an option in the admin to remove Read-Only attributes that have been added to combinations/single products. If the Read-Only option is the only thing that is tracked in SBA for a product, then the variant will be removed (levels are not synced automatically).
Also updated some of the terminology used in the admin's configuration window. Previous reference to Read-Only attributes was actually reference to Display Only attributes (as set in the attributes controller). Options set as Display Only when adding product will be added (currently) if the combo option is selected as part of the addition.
That code is to be modified to allow refined control; however, currently display only attributes will be added to selectable attributes when using the combo option.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Awesome, I will install this update this evening and see how things goes. In the meantime, I have another issue.
I've now started getting orders, and I'm not sure if I'm just not looking in the right place.
Senario:
Item created in zen cart. Has the default item# abc
and has two attribues attached (size-sm and lg and color-black and white)
In SBA I've created a list of all 4 combinations and assigned them each a unique "custom ID" abc-sm-w, abc-sm-b, abc-lg-w and abc-lg-b
And as usual my stock is all set to zero.
Now on the website the user sees the single-line dropdown (since right now I'm using the dynamic dropdown for multiple attribute is set to single dropdown)
It also lists all 4 possible combinations properly.
However no matter which is chosen, in the shopping cart it just shows item # abc (the "default one") and doesn't display the ids that I defined within SBA.
When I view the invoice and packing slip both within zen cart, none of my multiple attribute items have the little "sub-text" line with the SBA id. So I have no idea what options the user selected.
The single attribute SBA items are working beautifully.
Real life example from the invoice of an order in zen cart:
a single attribute item spits out:
Code:
1 x EDGE Hydra Dry Snorkel
- Color: Black / Black ( Item # EDG0364-BB ) EDG0364
while a multiple attribute item spits out:
Code:
1 x Edge Transcend Fins EDG0023
The multiple attribute item has size and color options with all possible combinations defined with unique IDs within the SBA module. The single attribute it displays the "-BB" item number defined within SBA (and looks perfect!), but on a multiple attribute item doesn't display anything.
PLEASE HELP since I've now made my store live, and I'm going nuts contacting customers to clarify their orders on anything containing multiple attribute items.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Be sure that in the stock configuration area that you have
SBA Display Custom ID set to true.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
Be sure that in the stock configuration area that you have
SBA Display Custom ID set to true.
On second thought, just tried the method above: Multiple_attributes set to single dropdown and obtained the same result as described.
The single Dropdown option(s) of Dynamic Dropdowns have not been modified to support this method of product addition. Currently the only Dynamic Dropdown method that has been modified to support this version of SBA is sba_sequenced_dropdown for multiple attributes. Single attributes are covered/addressed by using the built in code (not Dynamic Dropdowns).
So:
Dynamic Dropdowns -> Enable Dynamic Dropdowns set to 2 (or 0 which results the quantities not being available nor should the popups occur or other selectable options)
Dynamic Dropdowns -> Product Info Multiple Attribute Display Plugin set to sba_sequenced_dropdown
The other options remain available to support coding performed by other programmers to simply copy the applicable file for the chosen method.
Even the readme of the Dynamic Dropdown plugin indicates that for multiple attributes to use the sequenced dropdown and for single attributes to use the multiple_dropdowns. The others may now look right or work as designed; however, no additional code changes have been made either in the SBA code nor the Dynamic Dropdown code to support the other options (yet).
For further information, the use of the single dropdown for multiple attributes results in page data that doesn't match other "normal"/expected data. It will be interesting to get it to work, but it is currently not incorporated into this set of code.
Suggest incorporating the code from the download, adding the menu option using the SQL identified above and changing the settings to the above as well...
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I'm going to try to take a look at what it takes to accomodate that option, but one thing I see as a possible issue is the "reliability" of returning to the applicable selection(s) when clicking on the item in the cart. That is based on the options/values selected and at the moment I forget where that is generated in the process of adding an item to the cart because the value data will have to be deconstructed to relate it back to one of the SBA database options.