Page 349 of 356 FirstFirst ... 249299339347348349350351 ... LastLast
Results 3,481 to 3,490 of 3558
  1. #3481
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,297
    Plugin Contributions
    22

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

    I did a careful removal - checking after each set of files and it looks like the culprit is autoloader/config.products_with_attributes_stock.php
    The full-time Zen Cart Guru. WizTech4ZC.com

  2. #3482
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

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

    Quote Originally Posted by delia View Post
    my apologies if you've already addressed this but it's so basic. After uploading files, the catalog still works but the admin is showing a 500 error. Now granted this server is driving me crazy and this might not be typical but there is no error log to track this. v1.5.8, php 8.1
    Quote Originally Posted by delia View Post
    I did a careful removal - checking after each set of files and it looks like the culprit is autoloader/config.products_with_attributes_stock.php
    In another thread you discussed the issue about this server responding with a 500 error when just loading the Zen Cart 1.5.8 files from a zip file. At the moment I don't recall whether that zip file was of your own making/revision or straight from the Zen Cart source. Then from what had been posted about this issue, I can't tell if changes made to support Zen Cart 1.5.8 class member inheritance have been incorporated or how against which github commit the fileset was obtained.

    Basically, at the moment, unable to reproduce the issue. If server logs are not generated for you to see, would suggest contacting the host to gain more information. Removal of the autoloader file will prevent various operations, if all other files are present other than that one, I would suggest working within the file to remove actions starting at the back of the file.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3483
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,297
    Plugin Contributions
    22

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

    The problem appeared to be the zip files before - the server is screwing up the extraction of them, leading to the initial problems. I simply uploaded the files for this. There is no "hosting" as it's an owner managed server. And everything else is working fine (a few mods installed). I did remove all other files before the autoloader - it was the last one and why I mentioned it.
    The full-time Zen Cart Guru. WizTech4ZC.com

  4. #3484
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

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

    Quote Originally Posted by delia View Post
    The problem appeared to be the zip files before - the server is screwing up the extraction of them, leading to the initial problems. I simply uploaded the files for this. There is no "hosting" as it's an owner managed server. And everything else is working fine (a few mods installed). I did remove all other files before the autoloader - it was the last one and why I mentioned it.
    Well, if the autoloader file truly was the last of the plugin to be removed, I am not surprised by site start issues. The autoloader really doesn't do anything other than identify what file(s) to load and in what order. Because most files in an autoloader are before error handling is fully in place, loading may stop with an onscreen message, but little else. Would have to enable debugging to see at what autoloader condition was last met.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #3485
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,297
    Plugin Contributions
    22

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

    So I installed it on a php 8.1 default site on my hosting. First was a mangled IS_ADMIN_FLAG statement in the admin lang.reg_ddsba.php. My fix was just to remove the whole statement. No other problems detected so far.
    The full-time Zen Cart Guru. WizTech4ZC.com

  6. #3486
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

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

    Quote Originally Posted by delia View Post
    So I installed it on a php 8.1 default site on my hosting. First was a mangled IS_ADMIN_FLAG statement in the admin lang.reg_ddsba.php. My fix was just to remove the whole statement. No other problems detected so far.
    Assuming that the "older" language files weren't also on the server? I've applied a commit to correct the error generated in converting the files. That patch can be found at: https://github.com/mc12345678/Stock_...pull/107/files

    The only change applicable to this issue is in the first few lines of each language file.

    While that code section isn't "necessary" for operation, it is included to try not to cause issues if the software is loaded to a different system or if attempted to be executed without having stated Zen Cart for further processing.

    Thank you for reporting this issue!
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #3487
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

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

    Quote Originally Posted by mc12345678 View Post
    First commit pushed. Able to add product to the cart.
    I could not find that commit.
    Can you possibly share the link?

  8. #3488
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

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

    Quote Originally Posted by zamzom View Post
    I could not find that commit.
    Can you possibly share the link?
    The specific commit that added back functionality is: Restore ZC1.5.8 functionality accessing protected members · mc12345678/Stock_By_Attributes_Combined@083359b (github.com)


    However, there have been other improvements along the Zen Cart 1.5.8 consideration with commits made along the master path and the intention of not purposefully disabling older systems.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3489
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

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

    Trying to run SBA 1.5.4 for [ZC 1.5.8][PHP 8.0]
    Few remarks for some errors in admin/products_with_attributes_stock page.

    First it gives the following error
    --> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 1' at line 1

    In admin/includes/classes/products_with_attributes_stock.php
    on around line 376:
    PHP Code:
            $query_products =    "SELECT DISTINCT " $retFieldsTxt . ((empty($search_order_by_fields) || empty($retFieldsTxt)) ? '' ', ') . $search_order_by_fields 
              FROM " 
    TABLE_PRODUCTS_ATTRIBUTES " pa 
              INNER JOIN " 
    TABLE_PRODUCTS_DESCRIPTION " pd ON (pa.products_id = pd.products_id)
              INNER JOIN " 
    TABLE_PRODUCTS " p ON (pa.products_id = p.products_id)
              WHERE 
              pd.language_id=" 
    . (int)$language_id "
              " 
    $w "
              ORDER BY " 
    $search_order_by;
    //        . $SearchRange;      // zamzom: Took it out, because splitPageResults adds another LIMIT which triggers MySql error

            
    if (!isset($_GET['seachPID']) && !isset($_GET['pwas-search-button']) && !isset($_GET['updateReturnedPID'])) {
              
    $products_split = new splitPageResults($_GET['page'], STOCK_SET_SBA_NUMRECORDS$query_products$products_query_numrows);
            } 
    $SearchRange already carries a MySql LIMIT statement, however a consequtively coming call to splitPageResults adds another LIMIT statement so this triggers an error. I think the first $SearchRange can be ommited?

    Secondly, search does not function. It seems earlier search parameter was input through a Get statement (in admin/products_with_attributes_stock.php) however in the latest it was converted to a Post method. Nevertheless again in admin/includes/classes/products_with_attributes_stock.php around line 277
    PHP Code:
            if (isset($_GET['search']) && $_GET['search']) { // mc12345678 Why was $_GET['search'] omitted?
                
    $s zen_db_input($_GET['search']);
               
    //$w = "(p.products_id = '$s' OR d.products_name LIKE '%$s%' OR p.products_model LIKE '%$s%') AND  " ;//original version of search
                //$w = "( p.products_id = '$s' OR d.products_name LIKE '%$s%' OR p.products_model LIKE '$s%' ) AND  " ;//changed search to products_model 'startes with'.
               //$w = "( p.products_id = '$s' OR d.products_name LIKE '%$s%' ) AND  " ;//removed products_model from search
                
    $w " AND ( p.products_id = '$s
                            OR d.products_name LIKE '%
    $s%' 
                            OR p.products_model LIKE '%
    $s%' 
                            OR p.products_id 
                    IN (SELECT products_id 
                          FROM " 
    TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK " pwas
                          WHERE pwas.customid
                            LIKE '%
    $s%')
                            ) "
    //changed search to products_model 'starts with'.
            
    }

            
    //Show last edited record or Limit number of records displayed on page
            
    $SearchRange null;
            if (isset(
    $ReturnedProductID) && !isset($_GET['search'])) {
              
    $ReturnedProductID zen_db_input($ReturnedProductID);
              
    //$w = "( p.products_id = '$ReturnedProductID' ) AND  " ;//sets returned record to display
              
    $w " AND ( p.products_id = '$ReturnedProductID' ) " ;//sets returned record to display
              
    if (empty($_GET['products_filter']) || $_GET['products_filter'] < 0) {
                
    $SearchRange "LIMIT 1";//show only selected record
              

    Get statements are used and these don't get anything I think all of the $_GET['search'] should be replaced by $_POST['search']
    also there is an error with the $w assignment, the tag for product description table should be pd instead of d, again around line 282:
    PHP Code:
                $w " AND ( p.products_id = '$s
                            OR pd.products_name LIKE '%
    $s%' 
                            OR p.products_model LIKE '%
    $s%' 
                            OR p.products_id 
                    IN (SELECT products_id 
                          FROM " 
    TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK " pwas
                          WHERE pwas.customid
                            LIKE '%
    $s%')
                            ) "
    //changed search to products_model 'starts with'. 

  10. #3490
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

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

    Trying to run SBA 1.5.4 for [ZC 1.5.8][PHP 8.0]
    Few remarks for some errors in admin/products_with_attributes_stock page.

    First it gives the following error
    --> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 1' at line 1

    In admin/includes/classes/products_with_attributes_stock.php
    on around line 376:
    PHP Code:
            $query_products =    "SELECT DISTINCT " $retFieldsTxt . ((empty($search_order_by_fields) || empty($retFieldsTxt)) ? '' ', ') . $search_order_by_fields 
              FROM " 
    TABLE_PRODUCTS_ATTRIBUTES " pa 
              INNER JOIN " 
    TABLE_PRODUCTS_DESCRIPTION " pd ON (pa.products_id = pd.products_id)
              INNER JOIN " 
    TABLE_PRODUCTS " p ON (pa.products_id = p.products_id)
              WHERE 
              pd.language_id=" 
    . (int)$language_id "
              " 
    $w "
              ORDER BY " 
    $search_order_by;
    //        . $SearchRange;      // zamzom: Took it out, because splitPageResults adds another LIMIT which triggers MySql error

            
    if (!isset($_GET['seachPID']) && !isset($_GET['pwas-search-button']) && !isset($_GET['updateReturnedPID'])) {
              
    $products_split = new splitPageResults($_GET['page'], STOCK_SET_SBA_NUMRECORDS$query_products$products_query_numrows);
            } 
    $SearchRange already carries a MySql LIMIT statement, however a consequtively coming call to splitPageResults adds another LIMIT statement so this triggers an error. I think the first $SearchRange can be ommited?

 

 

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