Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2009
    Posts
    11
    Plugin Contributions
    0

    Default Error message on checkout step 2 when using a coupon

    I'm getting a fatal error trying to go from step 2 to 3 of checkout when using a coupon that has restrictions. If the coupon has no restrictions, checkout goes fine.

    This is the debug message: Uncaught TypeError: validate_for_category(): Argument #1 ($product_id) must be of type int, string given, called in /includes/functions/functions_gvcoupons.php on line 182 and defined in /includes/functions/functions_gvcoupons.php:210

    Don't know how to fix that or where to look for whatever's throwing the error. Help is appreciated. Thanks.

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

    Default Re: Error message on checkout step 2 when using a coupon

    You've discovered a big in the software.
    Change line 182 from:
    Code:
        $allow_for_product = validate_for_product($product_id, $coupon_id);
    To:
    Code:
        $allow_for_product = validate_for_product((int)$product_id, $coupon_id);
    Please report back the result which may include a similar statement about the coupon_id.

    Then take credit for the discovery in the bus section of the forum.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Dec 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Error message on checkout step 2 when using a coupon

    This fixed it. No further errors came up, and the checkout process completed. Thank you!
    ----
    Thanks,
    PNM

  4. #4
    Join Date
    Dec 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Error message on checkout step 2 when using a coupon

    Spoke too soon. The change also had to be made on line 183. Then there were no further errors. Thanks for your help.
    ----
    Thanks,
    PNM

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Error message on checkout step 2 when using a coupon

    I'll note that this currently occurs if-and-only-if a product with attributes (i.e. there's a string uprid as opposed to a simple products_id) is present in the cart.

 

 

Similar Threads

  1. error message when trying to checkout
    By sflasal in forum General Questions
    Replies: 1
    Last Post: 3 Feb 2011, 02:46 AM
  2. Error Message When Using Coupon. Please Help
    By MagicMan in forum General Questions
    Replies: 0
    Last Post: 25 Aug 2009, 05:24 PM
  3. Forwarded back to Step 2 without error message on confirm checkout
    By frenetic in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 5 Aug 2009, 01:52 AM
  4. Can't get past Step 1 of checkout when using ZoneTable shipping
    By gmunkee in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 9 Jan 2009, 11:47 PM
  5. Error message when testing checkout at my website
    By mmullen in forum General Questions
    Replies: 1
    Last Post: 29 Aug 2008, 05:21 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