Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I've encountered a problem when Dynamic Drop Downs, Product InfoMultiple Attribute Display Plugin is set as 'multiple_dropdowns'.
To rule out compatibility issues with other installed modules I've tested this on a clean installation of Zen Cart 1.5.6c and the latest version of SBA from GitHub, connected to the original site database.
When viewing a product that has two attributes, only the first attribute is shown as two separate drop downs. The label shown in both instances is that of the first attribute.
If I change admin settings to either sequenced_dropdowns or sba_sequenced_dropdowns it correctly displays the two attributes.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
simon1066
In ZC v1.57a (compared to v1.57) there are changes to
admin/packingslip.php
admin/invoice.php
that make it difficult for me to incorporate the SBA edits - bit of a guessing game. Would it be possible to update the Github code at some point?
Recently saw that there were some new additions to ZC in the area of changes made by SBA. Would be nice if can just use the changes mase without anything additional. Will see...
So yes, will need to do something to bring it up-to-date...
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
strelitzia
I've encountered a problem when Dynamic Drop Downs, Product InfoMultiple Attribute Display Plugin is set as 'multiple_dropdowns'.
To rule out compatibility issues with other installed modules I've tested this on a clean installation of Zen Cart 1.5.6c and the latest version of SBA from GitHub, connected to the original site database.
When viewing a product that has two attributes, only the first attribute is shown as two separate drop downs. The label shown in both instances is that of the first attribute.
If I change admin settings to either sequenced_dropdowns or sba_sequenced_dropdowns it correctly displays the two attributes.
This issue is caused by errors in includes/classes/pad_multiple_dropdowns.php
Line 108 is only referring to $attributes[0], meaning that it will only ever output the first attribute data of the array.
Change line 108 from
$out.='<tr><td align="right" class="main"><b>'.$attributes[0]['oname'].":</b></td><td class=\"main\">".zen_draw_pull_down_menu('id['.$attributes[0]['oid'].']',array_merge(array(array('id'=>0, 'text'=>'Select '.$attributes[0]['oname'])), $attributes[0]['ovals']),$attributes[0]['default'], "onchange=\"i".$attributes[0]['oid']."(this.form);\"")."</td></tr>\n";
to
$out .= '<tr><td align="right" class="main"><b>' . $attributes[$o]['oname'] . ":</b></td><td class=\"main\">" . zen_draw_pull_down_menu('id[' . $attributes[$o]['oid'] . ']', array_merge(array(array('id' => 0, 'text' => 'Select ' . $attributes[$o]['oname'])), $attributes[$o]['ovals']), $attributes[$o]['default'], "onchange=\"i" . $attributes[$o]['oid'] . "(this.form);\"") . "</td></tr>\n";
This will loop through all the attributes.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I am trying to improve my inventory control and would like to be able to insert a Item Location and MFG Item Number on the SBA item. Does anyone have any idea how I might do this?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
strelitzia
I've encountered a problem when Dynamic Drop Downs, Product InfoMultiple Attribute Display Plugin is set as 'multiple_dropdowns'.
To rule out compatibility issues with other installed modules I've tested this on a clean installation of Zen Cart 1.5.6c and the latest version of SBA from GitHub, connected to the original site database.
When viewing a product that has two attributes, only the first attribute is shown as two separate drop downs. The label shown in both instances is that of the first attribute.
If I change admin settings to either sequenced_dropdowns or sba_sequenced_dropdowns it correctly displays the two attributes.
The software was purposefully setup, directed and is supported to *not* use multiple_dropdowns in all available areas... Specifically, the information about how many options are available for any second selection is lost. Consider the situation where any possible selection is made available for two selection lists. If an item is selected from the second list that causes a choice from the second list to become non-available then the content of the first list needs to be updated or the customer only finds out after attempting to add the product to the cart... In that situation though, now if the customer is willing to use any of the items from the second list but must have that unavailable item from the first list, either an option from the second list must be selected that has an available first option or some sort of "reset" has to be done on the page.... Let me just say that offering software support for that is/would be exhausting.
Quote:
Originally Posted by
strelitzia
This issue is caused by errors in includes/classes/pad_multiple_dropdowns.php
Line 108 is only referring to $attributes[0], meaning that it will only ever output the first attribute data of the array.
Change line 108 from
$out.='<tr><td align="right" class="main"><b>'.$attributes[0]['oname'].":</b></td><td class=\"main\">".zen_draw_pull_down_menu('id['.$attributes[0]['oid'].']',array_merge(array(array('id'=>0, 'text'=>'Select '.$attributes[0]['oname'])), $attributes[0]['ovals']),$attributes[0]['default'], "onchange=\"i".$attributes[0]['oid']."(this.form);\"")."</td></tr>\n";
to
$out .= '<tr><td align="right" class="main"><b>' . $attributes[$o]['oname'] . ":</b></td><td class=\"main\">" . zen_draw_pull_down_menu('id[' . $attributes[$o]['oid'] . ']', array_merge(array(array('id' => 0, 'text' => 'Select ' . $attributes[$o]['oname'])), $attributes[$o]['ovals']), $attributes[$o]['default'], "onchange=\"i" . $attributes[$o]['oid'] . "(this.form);\"") . "</td></tr>\n";
This will loop through all the attributes.
But... What you can see is that the software does support this "minor" change to allow someone to use this option that was determined in development to not receive support... It is not a "bug" but a true design consideration that was made possible to have by some code modification/refactoring, but was specifically left to be processed as provided where mutliple_dropdowns is used when a product has a single attribute (option name) and one of the sequenced dropdowns is used for a product that has multiple attributes (multiple option names). Going the route of using multiple_dropdowns for this situation is considered not supported at this time and features otherwise built into the software are not available to the customer through the existing code...
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
jodean
I am trying to improve my inventory control and would like to be able to insert a Item Location and MFG Item Number on the SBA item. Does anyone have any idea how I might do this?
How are you currently using the custom id field if at all?
A similar field could be incorporated/added to the SBA data table(s) to support capturing this additional information. For one the "location" data could be made up of a reference to some other location table that is independently maintained. The MFG Item Number tends to be used/put in the customid field.
From there the question becomes what is needed to be done that needs assistance? Mind you, the details of which may be more appropriate in a separate branch. Here all that I see needed is to be sure that there is a storage location and perhaps some interface for entry and/or display...
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
How are you currently using the custom id field if at all?
A similar field could be incorporated/added to the SBA data table(s) to support capturing this additional information. For one the "location" data could be made up of a reference to some other location table that is independently maintained. The MFG Item Number tends to be used/put in the customid field.
From there the question becomes what is needed to be done that needs assistance? Mind you, the details of which may be more appropriate in a separate branch. Here all that I see needed is to be sure that there is a storage location and perhaps some interface for entry and/or display...
Does this work on 1.5.7b?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Nick1973
Does this work on 1.5.7b?
A little surprised no one else has chimed in on this one yet. :) But, I do have a minor dig and meant in the kindest of ways at least in a way of concern for one's site... What issues have been seen by installing the software onto your BACKUP/TEST version of your site that is version 1.5.7b?
Additionally, it appears that on the previous page, there is a post about version 1.5.7a which if anything is asking for an updated version of the files that are touched to support some of the available features. That post is: https://www.zen-cart.com/showthread....86#post1374386
So, to possibly minimize extra deliberation, understand that the full fileset on github is made of the standard "two parts". There are the files of the program and then there are the things that are Zen Cart version "dependent". In many ways both sets have been updated over time to try to improve the integration. This also means that because a file was used in a previous ZC version does not mean that it is needed in a newer ZC version. For example, the previous includes/modules/YOUR_TEMPLATE/attributes.php file no longer needs to be carried over in a ZC 1.5.7x environment because the version of the file provided in ZC 1.5.7 has enough features in it to not require overriding.
I don't know of anything changed between 1.5.7a and 1.5.7b that would have caused an issue with the software. I've been trying to run all of my test software through the highest available PHP version and with strict operation where possible. So, to what I started with, recommendation is to always have some sort of a backup/development site where you can make mistakes and have zero impact on your live store (other than taking time away from selling)... Sure, ideally there are no mistakes to be had, but one of the best ways to avoid that is through practice and on a system that "can't be bothered". :)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
A little surprised no one else has chimed in on this one yet. :) But, I do have a minor dig and meant in the kindest of ways at least in a way of concern for one's site... What issues have been seen by installing the software onto your BACKUP/TEST version of your site that is version 1.5.7b?
Additionally, it appears that on the previous page, there is a post about version 1.5.7a which if anything is asking for an updated version of the files that are touched to support some of the available features. That post is:
https://www.zen-cart.com/showthread....86#post1374386
So, to possibly minimize extra deliberation, understand that the full fileset on github is made of the standard "two parts". There are the files of the program and then there are the things that are Zen Cart version "dependent". In many ways both sets have been updated over time to try to improve the integration. This also means that because a file was used in a previous ZC version does not mean that it is needed in a newer ZC version. For example, the previous includes/modules/YOUR_TEMPLATE/attributes.php file no longer needs to be carried over in a ZC 1.5.7x environment because the version of the file provided in ZC 1.5.7 has enough features in it to not require overriding.
I don't know of anything changed between 1.5.7a and 1.5.7b that would have caused an issue with the software. I've been trying to run all of my test software through the highest available PHP version and with strict operation where possible. So, to what I started with, recommendation is to always have some sort of a backup/development site where you can make mistakes and have zero impact on your live store (other than taking time away from selling)... Sure, ideally there are no mistakes to be had, but one of the best ways to avoid that is through practice and on a system that "can't be bothered". :)
Ok, a straightforward 'Yes' or 'No' would have been sufficient :D
What you are saying more or less says it does work on 1.5.7a, and in turn should work on 1.5.7b. That is all I need to know at this point as I am working on a dev site anyway. :smile:
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Nick1973
Ok, a straightforward 'Yes' or 'No' would have been sufficient :D
What you are saying more or less says it does work on 1.5.7a, and in turn should work on 1.5.7b. That is all I need to know at this point as I am working on a dev site anyway. :smile:
Yes possible, but also seems like something of a self discovery as well... With as little feedback as I get about issues with the software, at times I often wonder if it only works for me. I therefore only encourage the use of it and to provide feedback, because otherwise any self-identified, unannounced issues just die in place to maybe not be discovered. Yes, there are some known issues most of which can be overcome with a little more development and incorporation of other tools.
Now, moving "beyond" ZC 1.5.7b, there *may* be an issue that I have seen as a possibility. I'm about to look into it, but the function zen_not_null will be changing return values in some specific cases. I need to verify that if and where I used that function that it will not cause an unexpected result. See this github discussion at least starting at the following post for further understanding: https://github.com/zencart/zencart/i...ment-751158215