Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    Quote Originally Posted by mc12345678 View Post
    Why an integer rather than a floating point number or a determination of if it is set or not to then determine a value against which to calculate? Won't forcing either the provided value or the calculated value to an integer cause a sort of "rounding" issue? 24.99 set to an integer would result in 24, 24.99/10 set to an integer would result in 2 instead of 2.50 or 2.499...
    I changed the coding to this:
    HTML Code:
    $rate = $currencies->get_value($_SESSION['currency']);
    if ($rate) {
      $pfrom = (int) $_GET['pfrom'] / $rate;
      $pto = (int) $_GET['pto'] / $rate;
    }
    now i can't add anything to my cart - so i'm changing it back now. is that the correct coding?

  2. #12
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    Quote Originally Posted by lidlchris View Post
    I changed the coding to this:
    HTML Code:
    $rate = $currencies->get_value($_SESSION['currency']);
    if ($rate) {
      $pfrom = (int) $_GET['pfrom'] / $rate;
      $pto = (int) $_GET['pto'] / $rate;
    }
    now i can't add anything to my cart - so i'm changing it back now. is that the correct coding?
    i changed the coding back to the original and still can't add anything to my cart.. not sure what's happening as this is probably why we haven't gotten an order in weeks. the error log in the /logs folder show no errors with the (int) coding nor without it.

  3. #13
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error in advanced search page.

    Quote Originally Posted by lidlchris View Post
    would i use (float) instead of (int)
    As implemented in Zen Cart 1.5.f, yes, would use (float) at that location.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error in advanced search page.

    The site is suffering from a series of mixed content. There is an htaccess rewrite forcing every page to show up as https:; however, the store is not configured to use https consistently. This stems primarily from following direction where the problem was described as receiving a blank screen rather than stating something like when attempting to add a product that told that the cart is empty...

    Big difference.

    The logged error going away is because the associated problem did go away but by using (int) instead of (float) a more logic error was generated rather than a "file" error.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #15
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    Quote Originally Posted by mc12345678 View Post
    The site is suffering from a series of mixed content. There is an htaccess rewrite forcing every page to show up as https:; however, the store is not configured to use https consistently. This stems primarily from following direction where the problem was described as receiving a blank screen rather than stating something like when attempting to add a product that told that the cart is empty...

    Big difference.

    The logged error going away is because the associated problem did go away but by using (int) instead of (float) a more logic error was generated rather than a "file" error.
    now i'm really lost. i was told to add that htaccess by someone on here and YES the problem at the time was a blank screen. The 'can't add to cart' didn't start until after December 3rd. THe mixed content you talk about i'm assuming is the fact that there are a number of add-ons for this site??

    by 'logical' error, what do you mean? it won't show up on the error log file? How would i go about debugging the fact that i can't anything to cart if there are no errors??

  6. #16
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error in advanced search page.

    Here's how v1.5.6 changed that section of code (note, the line numbers still don't match yours, probably because other parts of your file have been changed):
    https://github.com/zencart/zencart/b....php#L371-L382
    .

    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.

  7. #17
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    ok, i got lost with all the errors so i restored my site back to before this all started. Most issues are fixed. the 'division by zero' issue apparently is not fixed. Here is the error i got today when it looks like someone was doing a search?

    HTML Code:
    [17-Dec-2018 07:35:46 UTC] Request URI: /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all, IP address: 157.55.39.129
    #1  splitPageResults->__construct() called at [/home/honor/public_html/includes/modules/responsive_sheffield_blue/product_listing.php:16]
    #2  include(/home/honor/public_html/includes/modules/responsive_sheffield_blue/product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php:13]
    #3  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_index_product_list.php:156]
    #4  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_index_product_list.php) called at [/home/honor/public_html/includes/modules/pages/index/main_template_vars.php:241]
    #5  require(/home/honor/public_html/includes/modules/pages/index/main_template_vars.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:229]
    #6  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/honor/public_html/index.php:97]
    
    [17-Dec-2018 07:35:46 UTC] PHP Warning:  Division by zero in /home/honor/public_html/includes/classes/split_page_results.php on line 95

  8. #18
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error in advanced search page.

    Quote Originally Posted by lidlchris View Post
    ok, i got lost with all the errors so i restored my site back to before this all started. Most issues are fixed. the 'division by zero' issue apparently is not fixed. Here is the error i got today when it looks like someone was doing a search?

    HTML Code:
    [17-Dec-2018 07:35:46 UTC] Request URI: /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all, IP address: 157.55.39.129
    #1  splitPageResults->__construct() called at [/home/honor/public_html/includes/modules/responsive_sheffield_blue/product_listing.php:16]
    #2  include(/home/honor/public_html/includes/modules/responsive_sheffield_blue/product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php:13]
    #3  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_index_product_list.php:156]
    #4  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/templates/tpl_index_product_list.php) called at [/home/honor/public_html/includes/modules/pages/index/main_template_vars.php:241]
    #5  require(/home/honor/public_html/includes/modules/pages/index/main_template_vars.php) called at [/home/honor/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:229]
    #6  require(/home/honor/public_html/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/honor/public_html/index.php:97]
    
    [17-Dec-2018 07:35:46 UTC] PHP Warning:  Division by zero in /home/honor/public_html/includes/classes/split_page_results.php on line 95
    - According to that error report, visiting your site at this URL is what triggered it:
    /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all
    ... does that trigger it for you too?

    - And if you switch to Classic template (avoiding the Sheffield template), does the problem continue? (yes, I'm suspecting the template)
    .

    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.

  9. #19
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    Quote Originally Posted by DrByte View Post
    - According to that error report, visiting your site at this URL is what triggered it:
    /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all
    ... does that trigger it for you too?

    - And if you switch to Classic template (avoiding the Sheffield template), does the problem continue? (yes, I'm suspecting the template)
    Yes that page triggered it. I changed to the Hope (free zen cart template) and ran that page 3 more times and got the same error:
    HTML Code:
    [19-Dec-2018 00:45:37 UTC] Request URI: /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all, IP address: 160.3.207.42
    #1  splitPageResults->__construct() called at [/home/honor/public_html/includes/modules/template333/product_listing.php:30]
    #2  include(/home/honor/public_html/includes/modules/template333/product_listing.php) called at [/home/honor/public_html/includes/templates/template333/templates/tpl_modules_product_listing.php:12]
    #3  require(/home/honor/public_html/includes/templates/template333/templates/tpl_modules_product_listing.php) called at [/home/honor/public_html/includes/templates/template333/templates/tpl_index_product_list.php:94]
    #4  require(/home/honor/public_html/includes/templates/template333/templates/tpl_index_product_list.php) called at [/home/honor/public_html/includes/modules/pages/index/main_template_vars.php:241]
    #5  require(/home/honor/public_html/includes/modules/pages/index/main_template_vars.php) called at [/home/honor/public_html/includes/templates/template_default/common/tpl_main_page.php:124]
    #6  require(/home/honor/public_html/includes/templates/template_default/common/tpl_main_page.php) called at [/home/honor/public_html/index.php:97]
    
    [19-Dec-2018 00:45:37 UTC] PHP Warning:  Division by zero in /home/honor/public_html/includes/classes/split_page_results.php on line 95

  10. #20
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Error in advanced search page.

    Quote Originally Posted by lidlchris View Post
    Yes that page triggered it. I changed to the Hope (free zen cart template) and ran that page 3 more times and got the same error:
    HTML Code:
    [19-Dec-2018 00:45:37 UTC] Request URI: /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all, IP address: 160.3.207.42
    #1  splitPageResults->__construct() called at [/home/honor/public_html/includes/modules/template333/product_listing.php:30]
    #2  include(/home/honor/public_html/includes/modules/template333/product_listing.php) called at [/home/honor/public_html/includes/templates/template333/templates/tpl_modules_product_listing.php:12]
    #3  require(/home/honor/public_html/includes/templates/template333/templates/tpl_modules_product_listing.php) called at [/home/honor/public_html/includes/templates/template333/templates/tpl_index_product_list.php:94]
    #4  require(/home/honor/public_html/includes/templates/template333/templates/tpl_index_product_list.php) called at [/home/honor/public_html/includes/modules/pages/index/main_template_vars.php:241]
    #5  require(/home/honor/public_html/includes/modules/pages/index/main_template_vars.php) called at [/home/honor/public_html/includes/templates/template_default/common/tpl_main_page.php:124]
    #6  require(/home/honor/public_html/includes/templates/template_default/common/tpl_main_page.php) called at [/home/honor/public_html/index.php:97]
    
    [19-Dec-2018 00:45:37 UTC] PHP Warning:  Division by zero in /home/honor/public_html/includes/classes/split_page_results.php on line 95
    and then i switched to the responsive_classic and same message:
    HTML Code:
    [19-Dec-2018 00:49:46 UTC] Request URI: /index.php?main_page=index&manufacturers_id=52&sort=20a&page=all, IP address: 160.3.207.42
    #1  splitPageResults->__construct() called at [/home/honor/public_html/includes/modules/responsive_classic/product_listing.php:15]
    #2  include(/home/honor/public_html/includes/modules/responsive_classic/product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php:11]
    #3  require(/home/honor/public_html/includes/templates/responsive_classic/templates/tpl_modules_product_listing.php) called at [/home/honor/public_html/includes/templates/responsive_classic/templates/tpl_index_product_list.php:109]
    #4  require(/home/honor/public_html/includes/templates/responsive_classic/templates/tpl_index_product_list.php) called at [/home/honor/public_html/includes/modules/pages/index/main_template_vars.php:241]
    #5  require(/home/honor/public_html/includes/modules/pages/index/main_template_vars.php) called at [/home/honor/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:171]
    #6  require(/home/honor/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/honor/public_html/index.php:97]
    
    [19-Dec-2018 00:49:46 UTC] PHP Warning:  Division by zero in /home/honor/public_html/includes/classes/split_page_results.php on line 95

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 5 Sep 2014, 01:05 PM
  2. Replies: 10
    Last Post: 4 Oct 2010, 11:08 PM
  3. Replies: 5
    Last Post: 20 Apr 2010, 12:54 PM
  4. Remove 'Search by Date Added' field from advanced search page?
    By gaffettape in forum General Questions
    Replies: 7
    Last Post: 24 Jan 2010, 03:34 PM
  5. How to align search criteria boxes on advanced search page?
    By shinyadornments in forum Basic Configuration
    Replies: 1
    Last Post: 29 Jan 2008, 06:36 AM

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