Page 354 of 357 FirstFirst ... 254304344352353354355356 ... LastLast
Results 3,531 to 3,540 of 3564
  1. #3531
    Join Date
    Aug 2020
    Location
    Richarson
    Posts
    94
    Plugin Contributions
    0

    Default Re: Not working in PHP 7.4.3

    Quote Originally Posted by mc12345678 View Post
    From my perspective, getting the sba import feature to fully operate was to much, so an import feature was instead incorporated into easy populate version 4 (EP4).
    Okay, looks like: Detailed Stock By Attributes Data (detailed multi-line)...... I will go that route.....
    Thanks.

  2. #3532
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: Not working in PHP 7.4.3

    I recently upgraded from 1.5.7 to 1.5.8 and started receiving the following error whenever a search is done in SBA Search. I went back to 1.5.7 and it did not have the error. Then I tried upgrading for the second time with new douwn loads etc. and the error repeated. It appears the error is in 1.5.8.

    Has anyone else experienced the error?

    SBA Error
    Product ID Search


    [21-Jul-2023 21:20:31 UTC] Request URI: /shop_new/flinG-zvG-sKips/index.php?cmd=products_with_attributes_stock&page=1&search_order_by=products_id, IP address: 69.137.114.242, Language id 1
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:667]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:634]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:275]
    #4 queryFactory->Execute() called at [/flinG-zvG-sKips/includes/classes/split_page_results.php:220]
    #5 splitPageResults->numberRows() called at [/flinG-zvG-sKips/includes/classes/split_page_results.php:131]
    #6 splitPageResults->__construct() called at [/flinG-zvG-sKips/includes/classes/products_with_attributes_stock.php:389]
    #7 products_with_attributes_stock->displayFilteredRows() called at [/flinG-zvG-sKips/products_with_attributes_stock.php:1506]
    #8 require(/flinG-zvG-sKips/products_with_attributes_stock.php) called at [/flinG-zvG-sKips/index.php:11]
    --> PHP Fatal error: 1060uplicate column name 'products_id' :: SELECT count(*) as total FROM (SELECT DISTINCT pa.products_id, pd.products_name, p.products_quantity, p.products_model, p.products_image, p.products_type, p.master_categories_id, p.products_id FROM products_attributes pa INNER JOIN products_description pd ON (pa.products_id = pd.products_id) INNER JOIN products p ON (pa.products_id = p.products_id) WHERE pd.language_id=1 ORDER BY p.products_id ) countresults ==> (as called by) /flinG-zvG-sKips/includes/classes/split_page_results.php on line 220 <== in /includes/classes/db/mysql/query_factory.php on line 667.

  3. #3533
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: Not working in PHP 7.4.3

    There's a combination of reasons for the error now occurring in Zen cart 1.5.8, but not before. I thought I had sufficiently addressed such issues, but looking at the code and the message log posted, I clearly see that I had not.

    I'm not yet sure I consider this the most efficient or best solution, but it works to address the problem.

    In admin/includes/classes/products_with_attributes_stock.php at line 366, change it from:
    Code:
              if ($fieldsKey !== false) {
    To:
    Code:
              if ($fieldsKey !== false || 'products_id' === substr($fieldsKey, strpos($fieldsKey, '.') + 1)) {
    The issue ultimately is in the situation that occurred, the products_id was used as a search option, as well the products_attributes table's products_id is used as a returned value. In the loop of the above code, the expectation was to remove one of them from the query, but the existing logic doesn't support that.

    Part of a goal solution is to revisit why the product_attributes table products_id is used so that may be able to eliminate that as a problem. It's been so long since this section of code was developed I don't yet recall why that specifically is used and I haven't looked at it as part of this solution. Just wanted to fix the observed problem at least temporarily.

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

  4. #3534
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: Not working in PHP 7.4.3

    Still have the same problem.

    When entering the Product_ID in the search box.

    WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.

    Then an error log is created.

    [24-Jul-2023 12:17:13 UTC] Request URI: /shop_new/XlinG-zvZ-sBips/index.php?cmd=products_with_attributes_stock&page=1&search_order_by=products_id, IP address: 174.212.102.144, Language id 1
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:667]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:634]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:275]
    #4 queryFactory->Execute() called at [/deleted/includes/classes/split_page_results.php:220]
    #5 splitPageResults->numberRows() called at [/Deleted/includes/classes/split_page_results.php:131]
    #6 splitPageResults->__construct() called at [/XlinG-zvZ-sBips/includes/classes/products_with_attributes_stock.php:389]
    #7 products_with_attributes_stock->displayFilteredRows() called at [/Deleted/products_with_attributes_stock.php:1532]
    #8 require(/XlinG-zvZ-sBips/products_with_attributes_stock.php) called at [/Deleted/index.php:11]
    --> PHP Fatal error: 1060uplicate column name 'products_id' :: SELECT count(*) as total FROM (SELECT DISTINCT pa.products_id, pd.products_name, p.products_quantity, p.products_model, p.products_image, p.products_type, p.master_categories_id, p.products_id FROM products_attributes pa INNER JOIN products_description pd ON (pa.products_id = pd.products_id) INNER JOIN products p ON (pa.products_id = p.products_id) WHERE pd.language_id=1 ORDER BY p.products_id ) countresults ==> (as called by) /XlinG-zvZ-sBips/includes/classes/split_page_results.php on line 220 <== in /includes/classes/db/mysql/query_factory.php on line 667.

  5. #3535
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    9

    Default Re: Not working in PHP 7.4.3

    Quote Originally Posted by mc12345678 View Post
    There's a combination of reasons for the error now occurring in Zen cart 1.5.8, but not before. I thought I had sufficiently addressed such issues, but looking at the code and the message log posted, I clearly see that I had not.

    I'm not yet sure I consider this the most efficient or best solution, but it works to address the problem.

    In admin/includes/classes/products_with_attributes_stock.php at line 366, change it from:
    Code:
              if ($fieldsKey !== false) {
    To:
    Code:
              if ($fieldsKey !== false || 'products_id' === substr($fieldsKey, strpos($fieldsKey, '.') + 1)) {
    The issue ultimately is in the situation that occurred, the products_id was used as a search option, as well the products_attributes table's products_id is used as a returned value. In the loop of the above code, the expectation was to remove one of them from the query, but the existing logic doesn't support that.

    Part of a goal solution is to revisit why the product_attributes table products_id is used so that may be able to eliminate that as a problem. It's been so long since this section of code was developed I don't yet recall why that specifically is used and I haven't looked at it as part of this solution. Just wanted to fix the observed problem at least temporarily.

    Thank you for reporting this issue.
    rather than doing it this way, could one not simply change line 352 to p.products_id? i think it would be simpler. ie:

    Code:
    //from
            $retFields = array(
              'pa.products_id',
              'pd.products_name',
              'p.products_quantity',
              'p.products_model',
              'p.products_image',
              'p.products_type',
              'p.master_categories_id',
              );
    //to
            $retFields = array(
              'p.products_id',
              'pd.products_name',
              'p.products_quantity',
              'p.products_model',
              'p.products_image',
              'p.products_type',
              'p.master_categories_id',
              );
    i think that should work.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  6. #3536
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: Not working in PHP 7.4.3

    Quote Originally Posted by carlwhat View Post
    rather than doing it this way, could one not simply change line 352 to p.products_id? i think it would be simpler. ie:

    Code:
    //from
            $retFields = array(
              'pa.products_id',
              'pd.products_name',
              'p.products_quantity',
              'p.products_model',
              'p.products_image',
              'p.products_type',
              'p.master_categories_id',
              );
    //to
            $retFields = array(
              'p.products_id',
              'pd.products_name',
              'p.products_quantity',
              'p.products_model',
              'p.products_image',
              'p.products_type',
              'p.master_categories_id',
              );
    i think that should work.
    Your method solved the bug.

  7. #3537
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    9

    Default Re: Not working in PHP 7.4.3

    Quote Originally Posted by jodean View Post
    Your method solved the bug.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #3538
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

    Default Re: Not working in PHP 7.4.3

    Quote Originally Posted by jodean View Post
    Your method solved the bug.
    Of course, it is/was one of many potential solutions to the reported issue.
    Even still, there's an unresolved issue that was identified by this reporting. But, if happy with the results then will seek to resolve at a later date to further address what is desired in this area of code. I know I don't like the current results, but I can still get what I need.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3539
    Join Date
    Jul 2014
    Location
    Delaware USA
    Posts
    3
    Plugin Contributions
    0

    Default SBA Select List (Dropdown) Basic

    Current version 1.5.7b
    Using 1 option name with "SBA Select List (Dropdown) Basic" and I would like to rearrange how the quantity and price show in the dropdown. Current order is option value + stock qty + price. Would like to have it read option value + price + stock qty.
    Pretty sure I need to edit class.products_with_attributes_stock.php not sure where. Any guidance would be appreciated.
    Thanks

  10. #3540
    Join Date
    Jul 2005
    Location
    CA
    Posts
    240
    Plugin Contributions
    0

    Default Re: SBA Select List (Dropdown) Basic

    Last question, then I have a lot of other work to do.

    How do I set "No, Do not show Quantity Box" in EP?

 

 

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