Fix that has worked for me is by applying the changes identified in the following: Address missing language class in ZC 1.5.7b · mc12345678/Stock_By_Attributes_Combined@a41d979 (github.com)
Printable View
Fix that has worked for me is by applying the changes identified in the following: Address missing language class in ZC 1.5.7b · mc12345678/Stock_By_Attributes_Combined@a41d979 (github.com)
Added some additional code for those that have taken extra action to clean up their store files. After applying the above, also apply: Prevent trying non-existent file · mc12345678/Stock_By_Attributes_Combined@890bc16 (github.com) or just use the master branch files...
Thanks for your reply, and for all your work on ZenCart.
The search works with the first edit, but gives the error
--> PHP Warning: Illegal string offset 'id' in /admin/includes/classes/products_with_attributes_stock.php on line 503.
The search works with both edits, but gives the error
--> PHP Warning: Illegal string offset 'id' in /admin/includes/classes/products_with_attributes_stock.php on line 506.
Using the `zen_get_languages` function in your last edit fixed it. Great that the solution didn't add weight either.
What does one do if they run 1.5.7? Is there an update that addresses the depreciated files such as admin/includes/classes/order.php?
The version loaded to github includes all of the files that are needed to support 1.5.7 (as far as they have been reworked). Meaning, when looking at the overall process to upgrade, the recommendation is/has been to rebuild the site, incorporate changes that were made and bring on updated plugins (in no particular sequence).
The core files of SBA remain core to whatever version of Zen Cart is being used. Then the sub-directory for the ZC version includes files that are specific for operation in that version and in attempt to provide the expected output for operation.
For ZC 1.5.7, there are four admin files that are "touched" (though really the attributes_controller.php file is just the ZC 1.5.7"c" release of the file and there are no modifications to the file away from that version). There are 3 catalog side files specific to ZC 1.5.7 and those are only for template type information. Most of the modifications made in any/all of these files is to support the display of the customid...
That said, the only template file that *really* does something is found in the "core" files (because these files remain unchanged in ZC even up to this point) of: includes/templates/YOUR_TEMPLATE/templates/tpl_modules_attributes.php. This file is what provides the sequenced dropdowns. In truth if more were put into the output of the results in a javascript/jQuery way, then this file would not even need to be touched/modified and I think may be true about the main product image file.
FYI, there is no longer a need to override includes/modules/attributes.php if using the ZC 1.5.7 version of that file.
Anyways, depending on where you are at with your store, one way to go about things is to remove/restore the files found in your version's modifications that are not found in the 1.5.7 version's fileset. Why? because when using the more recent ZC fileset *and* the recent github fileset, less needs to be incorporated/touched... It just folds together...
Thanks for the edits and additional codes!
I'm missing something in installing SBA in zc 157c. I've added all the files and run stock_by_attr_install.php in admin, but I don't see the usual admin menu item under Catalog. Are there detailed installation instructions available somewhere?
TIA,
Dave
After accessing the stock_by_attr_install.php file, need to run the install (if haven't) within that. Note, above there has been some reporting of installation issues. I haven't been able to reproduce them and there is a sort of "test" plan described at this post. Initial report was that perhaps the browser used has/had something to do with it, but I haven't heard back about the testing that should more reliably identify some level of commonality.
There are a lot of other possible ways to track down the issue if it can reliably be reproduced. I'm also going to try to see what I can discover, but I basically did that testing on a new site but didn't experience the described issues...