Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    red flag Error log generated when adding items to cart

    php vers 7.3
    with Shopping cart Reminder
    Edit Orders
    TY Package tracker
    Email Export
    Clone Template
    ZCA Boot 4
    and Order Comment Boiler plate


    When adding an item to the shopping cart, we are receiving the following error log:
    Code:
    [07-Jan-2021 19:10:14 America/Chicago] Request URI: /index.php?main_page=shopping_cart, IP address: xxxxx
    #1  shoppingCart->calculate() called at [/includes/classes/shopping_cart.php:1362]
    #2  shoppingCart->show_total() called at [/includes/modules/pages/shopping_cart/header_php.php:45]
    #3  require(/includes/modules/pages/shopping_cart/header_php.php) called at [/index.php:35]
    --> PHP Warning: A non-numeric value encountered in /includes/classes/shopping_cart.php on line 737.
    When clicking on the item in the cart, once added, it brings the main page up and not the item in the cart

    I am at a loss of wheat to look for...


    ** Moderator's note: This is fixed in 1.5.7c by changes to includes/functions/functions_prices.php. See
    https://www.zen-cart.com/showthread....t.php+line+737
    Last edited by swguy; 30 May 2021 at 12:32 PM.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

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

    Default Re: Error log generated when adding items to cart

    Not urgent. I've seen this a few times. I think I already have a fix ...
    .

    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.

  3. #3
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by DrByte View Post
    Not urgent. I've seen this a few times. I think I already have a fix ...
    Excellent. ...and of course you do ;)
    Standing by.

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

    Default Re: Error log generated when adding items to cart

    I should clarify:
    This part, the warning, is what I meant is "not urgent":
    Code:
    PHP Warning: A non-numeric value encountered in /includes/classes/shopping_cart.php on line 737.
    And, I'm pretty sure it's only related to virtual products or free-shipping products.


    I think that's unrelated to your other issue of "When clicking on the item in the cart, once added, it brings the main page up and not the item in the cart".

    Can you explain what steps would need to be taken to recreate this scenario on a fresh new cart?
    .

    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.

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by DrByte View Post
    I should clarify:
    This part, the warning, is what I meant is "not urgent":
    Code:
    PHP Warning: A non-numeric value encountered in /includes/classes/shopping_cart.php on line 737.
    And, I'm pretty sure it's only related to virtual products or free-shipping products.


    I think that's unrelated to your other issue of "When clicking on the item in the cart, once added, it brings the main page up and not the item in the cart".

    Can you explain what steps would need to be taken to recreate this scenario on a fresh new cart?
    All items on the site are free shipping; www.needtoorder.com

    Add any item to the cart, then from the shopping cart, click on an item in the cart, it brings you back to the main page of the website.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

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

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by Carbonless View Post
    Add any item to the cart, then from the shopping cart, click on an item in the cart, it brings you back to the main page of the website.
    That seems to be something wrong in your template. There's no HREF in the html:

    HTML Code:
    <td class="productsCell"><a href=""><img src="images/buttons/magneticvehiclesigns.jpg" alt="Vehicle Magnet - Small" title="Vehicle Magnet - Small" width="50" height="30">Vehicle Magnet - Small</a>
    <input type="hidden" name="id[2223:1f509da0b7aedcb3dc23afea060040bb][1]" value="785"><div class="productsCell-attributes"><ul><li>    Qty&nbsp;-&nbsp;1</li>
    </ul></div>       
    </td>
    .

    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. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error log generated when adding items to cart

    Code:
    PHP Warning: A non-numeric value encountered in /includes/classes/shopping_cart.php on line 737.
    I knew I'd seen this before.
    After digging more, I don't think the final "fix" has been decided yet.

    Do you mind adding to the discussion over at https://www.zen-cart.com/showthread....pping_cart-php in regard to the read-only-attributes and price prefix, and perhaps help me recreate the problem?
    .

    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.

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by DrByte View Post
    Code:
    PHP Warning: A non-numeric value encountered in /includes/classes/shopping_cart.php on line 737.
    I knew I'd seen this before.
    After digging more, I don't think the final "fix" has been decided yet.

    Do you mind adding to the discussion over at https://www.zen-cart.com/showthread....pping_cart-php in regard to the read-only-attributes and price prefix, and perhaps help me recreate the problem?

    I have added to the other thread.

    Trying to diagnose what file is causing the non a href tag to properly link the cart contents...
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

  9. #9
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by DrByte View Post
    That seems to be something wrong in your template. There's no HREF in the html:

    HTML Code:
    <td class="productsCell"><a href=""><img src="images/buttons/magneticvehiclesigns.jpg" alt="Vehicle Magnet - Small" title="Vehicle Magnet - Small" width="50" height="30">Vehicle Magnet - Small</a>
    <input type="hidden" name="id[2223:1f509da0b7aedcb3dc23afea060040bb][1]" value="785"><div class="productsCell-attributes"><ul><li>    Qty&nbsp;-&nbsp;1</li>
    </ul></div>       
    </td>
    I have found that in the my template file: /includes/templates/MYTEMPLATE/templates/tpl_shopping_cart_default.php that when I CLONED the template, it changed line 94 from:
    Code:
    <a href="<?php echo $product['linkProductsName']; ?>"><?php echo $product['productsImage']; ?><?php echo $product['productsName'] . '' . $product['flagStockCheck'] . ''; ?></a>
    to this:

    Code:
    <a href="<?php echo $product['../../MYTEMPLATE/templates/linkProductsName']; ?>"><?php echo $product['productsImage']; ?><?php echo $product['productsName'] . '' . $product['flagStockCheck'] . ''; ?></a>
    I changed it back to the default for the ZCA Bootstrap 4 default and it fixed the linking problem.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

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

    Default Re: Error log generated when adding items to cart

    Quote Originally Posted by Carbonless View Post
    when I CLONED the template, it changed line 94
    ...
    to this:

    [CODE]<a href="<?php echo $product['../../MYTEMPLATE/templates/linkProductsName']; ?>">.......
    Interesting.

    I've never used that mod. Good to know it has "issues".
    .

    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.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 14 Feb 2011, 04:47 PM
  2. blank page when adding items to cart
    By kitcorsa in forum General Questions
    Replies: 7
    Last Post: 3 Jun 2009, 01:33 PM
  3. Blank pages when adding items to cart?
    By uberwench in forum General Questions
    Replies: 2
    Last Post: 13 Sep 2008, 03:08 PM
  4. Error with shopping_cart.php when adding items.
    By mohinder in forum General Questions
    Replies: 3
    Last Post: 25 Jul 2008, 09:22 PM
  5. Error when adding 13 items
    By teebo in forum General Questions
    Replies: 1
    Last Post: 23 Jun 2008, 06:56 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