Results 1 to 2 of 2

Credit Class & Gift Voucher

This is a discussion on Credit Class & Gift Voucher within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; *Sorry. Forgot some files in last upload. This is the full package. When installing on a fresh install of RC2a, ...

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Post Credit Class & Gift Voucher

    *Sorry. Forgot some files in last upload. This is the full package.

    When installing on a fresh install of RC2a, the following errors occur in admin section:

    errors on admin/coupon_admin.php
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /gearupaz/public_html/admin/includes/functions/database.php on line 107

    errors on admin/gv_mail.php:
    Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /gearupaz/public_html/admin/includes/functions/database.php on line 117

    Warning: Cannot modify header information - headers already sent by (output started at /gearupaz/public_html/admin/includes/functions/database.php:117) in /gearupaz/public_html/admin/includes/functions/general.php on line 22

    This is a fix for the CCGV (Contibution 282) where certain database.php errors and other problems are happening with the admin side.

    This is a full package for new installation, where the previous package caused some problems for new (drop-in) installations.

    *Built onto version 5.21
    *Credit for these solutions goes to original contributors and forum users.

    Fix gv_mail.php error:
    On line 64 replace:
    $insert_id = tep_db_insert_id($insert_query);
    with:
    $insert_id = tep_db_insert_id();

    Fix coupon_admin.php (under case: voucherreport, lines:227-230)
    replace:
    $cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
    $cc_query_numrows = tep_db_num_rows($cc_query);
    $cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
    $cc_query = tep_db_query($cc_query_raw);
    with:
    $cc_query_raw = "select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$coupon_id . "'";
    $cc_query = tep_db_query($cc_query_raw);
    $cc_query_numrows = tep_db_num_rows($cc_query);
    $cc_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);

    *Thanks OSC community for all efforts and making one of the most practical contributions a possibility.


    More...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    Lurker
    Join Date
    Mar 2009
    Posts
    3
    Rep Power
    0


    Default Re: Credit Class & Gift Voucher

    Thank you for the fix. I found that there are two instances of:
    $insert_id = tep_db_insert_id($insert_query);
    in gv_mail.php (lines 69 and 98).

    If I only changed the one on line 69 it fixed the errors and inputted everything in the admin section correctly, but did not send an email. Replacing both seems to have this baby running smooth.

    Thanks again!

Similar Threads

  1. Credit Class & Gift Voucher
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-31-2008, 11:01 AM
  2. Credit Class & Gift Voucher
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-18-2008, 06:00 PM
  3. Credit Class & Gift Voucher
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-05-2008, 10:00 AM
  4. Credit Report for Credit Class & Gift Voucher
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-24-2007, 05:31 PM
  5. Credit Class & Gift Voucher
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-04-2007, 04:06 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
  •