Page 332 of 356 FirstFirst ... 232282322330331332333334342 ... LastLast
Results 3,311 to 3,320 of 3558
  1. #3311
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    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
    Yes that is all good with me. I am working on a dev site so it won't be so much of an issue if bugs are found at this point. I will obviously report anything back here.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #3312
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    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
    Fyi and fwiw, there are cases of the use of zen_not_null that will be affected in the future by the way the function is being changed. Am working through the logic and code to confirm and replace as necessary. My expectation is to update them in a single commit as best as possible.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3313
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    Fyi and fwiw, there are cases of the use of zen_not_null that will be affected in the future by the way the function is being changed. Am working through the logic and code to confirm and replace as necessary. My expectation is to update them in a single commit as best as possible.
    Um ... I thought we'd resolved that so there's no functional change to the zen_not_null() function, despite PHP8's apparent change.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #3314
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by DrByte View Post
    Um ... I thought we'd resolved that so there's no functional change to the zen_not_null() function, despite PHP8's apparent change.
    Unfortunately no, please see the post that was two down in the github path discussed above. The post that provides how it works in upcoming versions is: https://github.com/zencart/zencart/i...ment-751171029

    Under the new code (using !== 'NULL' while using PHP <8.0 or at any time PHP 8.x is used) the result of passing an integer value of 0 to zen_not_null is different than how zen_not_null operated in ZC 1.5.7b and below (when using PHP < 8.0).

    Personally, while it appears that the function (zen_not_null) was intended to address/respond to text, a null value and the return of database queries, I believe that the code of SBA (written over many years) could use a little updating to move away from using zen_not_null for cases that should be covered by empty or other similar evaluation methods. I say that, if for no other reason than, to ensure that the code is setting, expecting, and handling all of the appropriate data types to minimize any undesirable vectors.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #3315
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Okay. I'll concede that it's changing: It's changing to what it was always intended to do.

    I'll add for clarification: In Zen Cart core code zen_not_null is/was never used for assessing integers specifically.
    (I can't speak for how/whether addons have used it in that way.)
    Testing the truthy-ness of an integer is better done with empty().

    Starting from v1.5.8 zen_not_null is only used where empty() would not be appropriate: prices, search, dates.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #3316
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I've tried installing SBA on 1.5.7b and I am getting a blank admin page when going to Catalog > Attributes Controller

    This is in the logs:

    [11-Jan-2021 17:17:06 Europe/London] Request URI: /~MYWEBSITE/zcadmin/index.php?cmd=attributes_controller&products_filter=1&current_category_id=5, IP address: 86.17.120.117
    #1 trigger_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:170]
    #2 queryFactory->show_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:142]
    #3 queryFactory->set_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:269]
    #4 queryFactory->Execute() called at [/home/MYWEBSITE/public_html/zcadmin/attributes_controller.php:762]
    #5 require(/home/MYWEBSITE/public_html/zcadmin/attributes_controller.php) called at [/home/MYWEBSITE/public_html/zcadmin/index.php:11]
    --> PHP Fatal error: 1146:Table 'MYDB_zenca28.zengp_products_with_attributes_stock' doesn't exist :: select distinct products_id FROM zengp_products_with_attributes_stock where products_id = 1
    ==> (as called by) /home/MYWEBSITE/public_html/zcadmin/attributes_controller.php on line 762

    So zengp_products_with_attributes_stock table is missing. Is there an SQL file somewhere that needs processing? It isn't clear as there aren' any installation instructions that I can see.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  7. #3317
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by Nick1973 View Post
    I've tried installing SBA on 1.5.7b and I am getting a blank admin page when going to Catalog > Attributes Controller

    This is in the logs:

    [11-Jan-2021 17:17:06 Europe/London] Request URI: /~MYWEBSITE/zcadmin/index.php?cmd=attributes_controller&products_filter=1&current_category_id=5, IP address: 86.17.120.117
    #1 trigger_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:170]
    #2 queryFactory->show_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:142]
    #3 queryFactory->set_error() called at [/home/MYWEBSITE/public_html/includes/classes/db/mysql/query_factory.php:269]
    #4 queryFactory->Execute() called at [/home/MYWEBSITE/public_html/zcadmin/attributes_controller.php:762]
    #5 require(/home/MYWEBSITE/public_html/zcadmin/attributes_controller.php) called at [/home/MYWEBSITE/public_html/zcadmin/index.php:11]
    --> PHP Fatal error: 1146:Table 'MYDB_zenca28.zengp_products_with_attributes_stock' doesn't exist :: select distinct products_id FROM zengp_products_with_attributes_stock where products_id = 1
    ==> (as called by) /home/MYWEBSITE/public_html/zcadmin/attributes_controller.php on line 762

    So zengp_products_with_attributes_stock table is missing. Is there an SQL file somewhere that needs processing? It isn't clear as there aren' any installation instructions that I can see.
    In earlier design, I had a request to be able to install the software but not to activate it until one wanted to activate it. That said, it appears that the attributes_controller aspect does not currently support that.

    Regardless, while it is true that there is not a set of instructions currently associated with the install (reason it is not updated in the ZC plugins area), generally speaking the installation instructions are still the same as potteryhouse issued years ago...

    Effectively, to complete the installation (after file upload), go to admin/stock_by_attr_install.php and that will initiate the installation and/or support installing the software to include this missing database table (along with others that are installed).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #3318
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I have updated the 1.5.6 and 1.5.7 versions of the attributes_controller to basically "skip" that logic if the table is not defined or if the table is not in the database... I also updated the file for those two versions to incorporate whatever code is currently out there to bring that file up-to-date.

    Note that my plan (at some point) is actually to remove the code that is in the file and have its output incorporated into the display by way of javascript or jQuery unless another notifier gets introduced that will better support what is needed in these two places... Use of javascript/jQuery will introduce its own issues and concerns with support, but will at least eliminate the file modification.

    In updating the file for this, I also realized that I had set aside some text response in this area to be adjusted based on the product being tracked by SBA or not. I had merged a few statements because they generally had the same complexity, but were expected to output something different. So this is addressed/corrected in this area of code: https://github.com/mc12345678/Stock_....php#L770-L775

    It only affected ZC 1.5.7 as 1.5.6 and before had it spread out more and was a little "messier"..

    Anyways, updates have been pushed to the master branch:
    https://github.com/mc12345678/Stock_By_Attributes_Combined
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3319
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    I have updated the 1.5.6 and 1.5.7 versions of the attributes_controller to basically "skip" that logic if the table is not defined or if the table is not in the database... I also updated the file for those two versions to incorporate whatever code is currently out there to bring that file up-to-date.

    Note that my plan (at some point) is actually to remove the code that is in the file and have its output incorporated into the display by way of javascript or jQuery unless another notifier gets introduced that will better support what is needed in these two places... Use of javascript/jQuery will introduce its own issues and concerns with support, but will at least eliminate the file modification.

    In updating the file for this, I also realized that I had set aside some text response in this area to be adjusted based on the product being tracked by SBA or not. I had merged a few statements because they generally had the same complexity, but were expected to output something different. So this is addressed/corrected in this area of code: https://github.com/mc12345678/Stock_....php#L770-L775

    It only affected ZC 1.5.7 as 1.5.6 and before had it spread out more and was a little "messier"..

    Anyways, updates have been pushed to the master branch:
    https://github.com/mc12345678/Stock_By_Attributes_Combined
    Ok, well going to admin/stock_by_attr_install.php seemed to work and it appears to have installed.

    On GitHub it says it only goes up to 1.5.6 and you have 1.5.7 files in the installation. Perhaps you need to update what it says on GitHub as well?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  10. #3320
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by Nick1973 View Post
    Ok, well going to admin/stock_by_attr_install.php seemed to work and it appears to have installed.

    On GitHub it says it only goes up to 1.5.6 and you have 1.5.7 files in the installation. Perhaps you need to update what it says on GitHub as well?
    In review to answer your question I noticed the same.

    When I went back into my local git repository I saw that I had that prepped but hadn't loaded it.

    The repository is updated; however, I still want to indicate that as of right now with the revision forthcoming to Zen Cart 1.5.7 (1.5.7c) and/or the use of PHP 8.x that this plugin will not operate correctly until its use of zen_not_null is modified. In some cases more evaluation is needed in a code segment, in other cases a completely different evaluation should be used such as !empty, isset or similar.

    I am going through the code where zen_not_null has been used and making modifications, with all to be pushed as a single commit instead of by piecemeal. This is a result of my incorrect usage of that function and that the function is being further modified to provide the result(s) that had been expected for its use. In the discussion had, it was not intended to be a replacement for functions such as is_null, empty, isset, === false, etc... It has a somewhat more narrow use, primarily appearing to be for the evaluation of query data.

    Will identify when that update is complete.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR