Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 658,375

Results 2,201 to 2,220 of 3,609
2 Jun 2015, 9:38 PM
#2201
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Malaperth:

Now I believe I know why the conversation is now here...

Anyway, with all the fixes and merges that have been done on Github, an old man like me gets confused... or maybe I'm just dense (my wife added that)... But, where can I get the absolute latest functional version for 1.5.1 please?

Mal

https://github.com/potteryhouse/stock_by_attribute_1.5.3/

is the version that supports ZC 1.5.1

All the files have been brought to a single branch with a branch stub available to test/publish other changes before incorporating into the master branch.

2 Jun 2015, 9:50 PM
#2202
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

tronage:

Sent you a PM with links to my site. The original item (with 2 attributes) works as expected, but now a new item I made with only 1 attribute is now displaying "out of stock" next to all the attributes in the dropdown. If I add a 2nd attribute to that very item then the "out of stock" messages go away. Is this a "bug" or is there somewhere else to turn off out of stock messages on single attribute items?

Understand, so yes there is a difference in how single and multiple attributes are handled. Currently single attributes are handled through 1) the setting in Dynamic Dropdowns configuration as to whether to be active for single, multiple or all attributes. The Dynamic Dropdown code provided in the SBA module does not fully work with the current JavaScript and the previous sequenced dropdown code has been updated/modified to function and provide options that are similar to what was created by potteryhouse/jeking for single attributes. There remains a few things to be incorporated and wrinkles to iron out.

So, when addressing issues with this, like before, details are needed to understand the setup and identify the potential issues first before a deep code review.

It was my understanding (as I have tried to minimize touching the results of what potteryhouse and jeking were expecting, that the display of out-of-stock for single attribute dropdowns was optional and controlled in the configuration menu. I will say, that if the expectation is that no product is to display out-of-stock, then the text could be removed from the define keeping the constant on the left, and have the single quotes on the right be empty. That's a cheat way and doesn't fix the central problem, but would work in the interim until the source of the issue is found.

Unfortunately and as somewhat pointed out by malaperth, there have been a number of changes, merges, pushes, etc... that it may be difficult to determine the difference(s) that may be present possibly contributing to this. Sorry for also being a bit of a pain, but could you identify the SBA version and ZC version associated to try to validate the issue, and on what date SBA was downloaded? (Thinking that may be the best way to determine if the issue has since been resolved by other updates.)

2 Jun 2015, 11:07 PM
#2203
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Sorry for also being a bit of a pain, but could you identify the SBA version and ZC version associated to try to validate the issue, and on what date SBA was downloaded? (Thinking that may be the best way to determine if the issue has since been resolved by other updates.)
No pain at all and I'm very appreciative of the time and effort that you have taken to respond. It is quite refreshing! I'm using the SBA 1.5.4-master that I downloaded on 6/1/15. from the link I posted in my previous post. And I'm currently running Zen 1.5.4 And prior to installing I checked the overwrite files, and none of them needed a merge (in other words the handful of add-ons I've installed did not make any changes to the overwrite files in the SBA package).

I also figured out "something" that may either help in tracking it down, or it at least fixes my functionality... previously to get rid of the pop-up issue I set "Enable Dynamic Dropdowns" to off, and that killed the popup from popping (yay), so based on what you said about the different handling I figured maybe turning on the dynamic for single attributes would do "something", so setting this to "On for single attribute only". Now my multi-attributes still don't pop and don't show out of stock (yay) and my single attribute also does not display out of stock (double yay).

So I'm not sure if that is a work around, or a help in finding a bug, or a working as intended, but (at least for now) it seems to function as I would like it to.
Thanks!

3 Jun 2015, 1:14 AM
#2204
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

tronage:

No pain at all and I'm very appreciative of the time and effort that you have taken to respond. It is quite refreshing! I'm using the SBA 1.5.4-master that I downloaded on 6/1/15. from the link I posted in my previous post. And I'm currently running Zen 1.5.4 And prior to installing I checked the overwrite files, and none of them needed a merge (in other words the handful of add-ons I've installed did not make any changes to the overwrite files in the SBA package).

I also figured out "something" that may either help in tracking it down, or it at least fixes my functionality... previously to get rid of the pop-up issue I set "Enable Dynamic Dropdowns" to off, and that killed the popup from popping (yay), so based on what you said about the different handling I figured maybe turning on the dynamic for single attributes would do "something", so setting this to "On for single attribute only". Now my multi-attributes still don't pop and don't show out of stock (yay) and my single attribute also does not display out of stock (double yay).

So I'm not sure if that is a work around, or a help in finding a bug, or a working as intended, but (at least for now) it seems to function as I would like it to.
Thanks!

So, if it is worth anything, I need to verify the version uploaded to the version I just tested, but I also don't recall changing anything about Dynamic Dropdowns recently, but with the following settings I was able to continue using Dynamic Dropdowns and control the notification of the out-of-stock statement. (Mind you, out-of-stock could be changed to something like on-back order, or other terminology.)

Enable Dynamic Dropdowns 2
Product Info Single Attribute Display Plugin multiple_dropdowns
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes Right
Display Out of Stock Message Line False
Prevent Adding Out of Stock to Cart True
SBA Number of Records to Displayed 25

The first setting identifies that DD is to only apply on multiple attribute products.
The Show Out of Stock attributes part allows display of attributes that would be well considered out-of-stock.
The Mark Out of Stock Attributes adds the text that is normally Out Of Stock to the left, right, or not at all in the drop down window.
The Display Out of Stock Message Line couples the javascript popup and the text that appears after acknowledging the out-of-stock popup so that if set to True, then will get the popup, if set to false, then will not.
The "Prevent Adding Out of Stock to Cart" option appears to only control notification that a product is out-of-stock upon trying to add the product to the cart; however, does not yet prevent/cancel adding the product to the cart.

Just some testing that was performed to investigate this as well as another issue....

3 Jun 2015, 6:22 PM
#2205
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Going off of what you are saying, I did some experimenting. I turned the dynamic dropdowns to 1 (so it is on for both single and multi). Here is how I have my dynamic Drop downs set:
Enable Dynamic Dropdowns 1
Product Info Single Attribute Display Plugin single_dropdown
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes None
Display Out of Stock Message Line False
Prevent Adding Out of Stock to Cart False
SBA Number of Records to Displayed 25

For my experiment, I only made changes to "Product Info Multiple Attribute Display Plugin". Here are the results for a product with 2 attributes (color and size):
single_radioset - works as expected
single_dropdown - works as expected (What I'll probably start using since I like dynamic and this one currently works)
multiple_dropdowns - Broken - displays the first attribute for BOTH dropdowns (ex: Color: and then below that Color: again when the 2nd should be Size)
sequenced_dropdowns - Broken - Color and Size dropdowns are "empty" clicking them just shows "First Select Color" with no options, and "next select size" with no options. (Even though I do have "Show Out of Stock Attributes" set to True)
sba_sequenced_dropdowns - Broken - Even through I have "display out of stock message line" set to false (which you said should stop the javascript pop up) I STILL get the pop-up message when I make a selection, and after I dismiss the pop-up text appears below the dropdowns with a similar out of stock message.

With dynamic turned OFF multi-attribute - works as expected, and no out of stock messages. Single-attribute starts showing a rogue out of stock line...

So I wanted to compare what the out of stock message looks like when it SHOULD show (Dynamic on, mark on right) to the message that shouldn't show (with dynamic off) Something interesting I found:
With Dynamic drop downs on, and "mark out of stock Attributes" set to "right" on my single attribute items I get:
"Red - Out of stock"
BUT if I set dynamic drop downs to 0 (off) and not change anything else I get:
"Red Out of Stock"

The difference is the lack of a "-" and a capitol "S" in stock. This might help aid it tracking things down since the two phrases being displayed are different I'm thinking... I'm no programmer, but I can help search:

from the source download, I'm seeing the lowercase "s" version here:
\includes\languages\dutch\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');
\includes\languages\english\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');
\includes\languages\french\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');

And I'm seeing the upper case "S" version here:
\admin\stock_by_attr_install.php(673): ('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', 'Controls the display of out of stock attributes.', :configuration_id:, 10, now(), NULL, 'zen_cfg_select_option(array('True', 'False'),'),
\admin\stock_by_attr_install.php(674): ('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', :configuration_id:, 30, now(), NULL, 'zen_cfg_select_option(array('None', 'Right', 'Left'),'),
\admin\stock_by_attr_install.php(675): ('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', 'Controls the display of a message line indicating an out of stock attributes is selected.', :configuration_id:, 40, now(), NULL, 'zen_cfg_select_option(array('True', 'False'),'),
\admin\stock_by_attr_install.php(676): ('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', 'Prevents adding an out of stock attribute combination to the cart.', :configuration_id:, 50, now(), NULL, 'zen_cfg_select_option(array('True', 'False'),'),
\includes\classes\pad_sba_sequenced_dropdowns.php(253): $out.=" alert('All selections of the attributes below this one are Out of Stock. Please select a different option.');\n";
\includes\languages\dutch\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
\includes\languages\english\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
\includes\languages\french\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');

Again I'm not a programmer, but if I ended up wanting to change the text to maybe "Special order item" or something like that I would just change the define text in one of the files above (I guess the dynamic php if I'm using dynamic and pwa php if I'm not?)?

Let me know if any of this helps.

3 Jun 2015, 10:13 PM
#2206
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Looked over the recent discussion on the topic and didn't see the following addressed. (If I missed it, my apologies) how are the multiple attribute combinations generated? Are they a series of single attributes with one attribute each with a quantity or as a combination of attributes with a quantity associated with each combination?

What other plugins are installed as with a fresh install of ZC and SBA, those issues have yet to be encountered. FYI, the other types of DD display have not been modified from the version available for download from the plugins section. This allows users to continue with whatever rewritten version(s) they may have as developed by others.

3 Jun 2015, 10:49 PM
#2207
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

The other question related to this is what type of dropdown is used? Using the default ZC dropdown or the SBA dropdown?

4 Jun 2015, 12:30 AM
#2208
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

The other question related to this is what type of dropdown is used? Using the default ZC dropdown or the SBA dropdown?
The dropdown type I'm using for the options are SBA Select List (dropdown) basic
As I said earlier I only have a handful of addons, none of which I think would be relevant (they are usps, ups and paypal). And prior to install none of the overwrites had any thing to be merged. As for your last question, I'm not sure I follow, but I will tell you my process of adding an item:

  1. create the item
  2. assign the attributes using the attribute controller
  3. use the products with attributes stock (aka SBA) to find the item I created,
  4. click the "add quantity for product variant"
  5. then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.
4 Jun 2015, 1:43 AM
#2209
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

tronage:

The dropdown type I'm using for the options are SBA Select List (dropdown) basic
As I said earlier I only have a handful of addons, none of which I think would be relevant (they are usps, ups and paypal). And prior to install none of the overwrites had any thing to be merged. As for your last question, I'm not sure I follow, but I will tell you my process of adding an item:

  1. create the item
  2. assign the attributes using the attribute controller
  3. use the products with attributes stock (aka SBA) to find the item I created,
  4. click the "add quantity for product variant"
  5. then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.

So I haven't attempted to duplicate the scenario specifically to see if this is the case, but below should be two images showing the two different scenarios to which I speak. They are created by different means on the front end in the admin. The first is as described many attributes each with their own stock. The second is many attributes combined as individual variant "products" each combination of attributes having a single quantity of availability.

Attachment #15337

Attachment #15338

Then with regards to:

tronage:

  1. then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.

Could you elaborate on just a few what?
Just a few option names such as color, size, brand? or just a few option values under each option name? Such as perhaps two colors, two sizes, 1 brand, then would manually select each of the four combinations possible?

Asking for a couple of reasons, one is to identify the current system response by the choice of options (and associated changes necessary) and to figure out why with no plugins that directly affect this one why the results are so significantly different. I'll double check the files that are uploaded as compared to those that are satisfactorily working otherwise both locally and by others thus far...

4 Jun 2015, 3:36 PM
#2210
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

I forgot I'm also using WinchesterBlack template... don't know if that counts as an "add-on" since I wouldn't think it messes with function, more just layout and color. And, I think I kinda get it (I apologize). I've been using the terms single and multi to reference how many attributes. So when I've been saying single, I am referring to the single-multi you show (one item, that has just one attribute, populated by say color, so item widgets, comes in red, green, and blue. zero stock in each. This is the scenario that when I turn off the dynamic, shows the odd out of stock message.

When I have been saying multi, I'm referring to multi-attributes, so this would be like your combo-multi, meaning widgets come in red, green, blue, and small, med, large. Therefore there is a matrix formed for 9 options, each with their own id and stock. These are the ones that seem to all be "broken" in some way when using any type of dynamic other then the single drop or the radio button (the first 2 options). the rest all have quirks as I described in my previous message.

To answer your question regarding "by just a few", I mean, lets say I have widgets in red green and blue. So in the "products with attributes stock (aka SMB)" page I would find my item, click add quantity for product, and then being there is only 1 drop down, with 3 options (total 3 variants) I would select a atribute, fill in the id and quantity and hit submit for each. But now if I had a 2nd item Widgets with Colors red, orange, yellow, green, blue, and purple. And sizes xs, s, m, l, XL, 2XL, that would yield 36 combinations, so rather then doing each one individually (since I already know the stock for all is zero) I would pick "all-attributes-combo" for both color and size, leave description and id blank, and fill in quantity as zero, and hit submit. I would then be presented with a matrix of all 36 possible options, to which I would just click on the ID spot for each one and fill in the IDs for them.

Now I can tell you regardless if an item had one attribute or two (I don't think I have any items with three), all items I entered when I originally posted were all entered by manually selecting from the drop-downs for each item or item combo. It wasn't until maybe yesterday I figured out my way to speed up the process by using the all-attributes-combo, and I have to say since I know all my stock is currently zero, I've been lazy and using it on pretty much all my items (even if it is just one attribute with two choices). I find it much easier to fill in item ids into a matrix (reminds me of using excel), then manually doing each on a form and clicking submit.

I hope that at least gives you the information you need. And I hope I answered your questions sufficiently.

4 Jun 2015, 4:17 PM
#2211
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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".

4 Jun 2015, 9:53 PM
#2212
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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

7 Jun 2015, 1:02 AM
#2213
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

So, mc12345678, the link you posted in post #2201 should still be the correct link once you get the above fixes in?

Mal.

7 Jun 2015, 2:02 AM
#2214
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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.php?47180-Stock-by-Attribute-v4-0-addon-for-v1-3-5-1-3-9&p=1283615#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to https://github.com/potteryhouse/stock_by_attribute_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.

7 Jun 2015, 1:48 PM
#2215
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

For users of ZC 1.5.1, yes the link in https://www.zen-cart.com/showthread.php?47180-Stock-by-Attribute-v4-0-addon-for-v1-3-5-1-3-9&p=1283615#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to https://github.com/potteryhouse/stock_by_attribute_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.

8 Jun 2015, 2:57 PM
#2216
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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.

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.

10 Jun 2015, 7:30 PM
#2217
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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:

1 x EDGE Hydra Dry Snorkel
  - Color: Black / Black ( Item # EDG0364-BB )   EDG0364 

while a multiple attribute item spits out:

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.

10 Jun 2015, 10:00 PM
#2218
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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.

10 Jun 2015, 10:25 PM
#2219
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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...

10 Jun 2015, 11:21 PM
#2220
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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.