Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 10 of 10

Thread: changes with gift voucher

  1. #1
    altenter
    Guest


    Default changes with gift voucher

    hola!
    i have gift voucher discount of 10$.
    i want to remove it, and give an overall 10% discount on the whole shop. (or if easier, change the gv to 10%)
    help appreciated,
    thanks.

  2. #2
    battleaxe
    Guest


    Default

    altenter,

    Please, like the rest of us have had to, search through the forum before you post, many of the answers are there.

    The answer to yours is here http://oscdox.com/index.php?name=PNp...t=gift+voucher

  3. #3
    altenter
    Guest


    Default

    i have searched endlessly, but apparently not enough
    thanks battleaxe for the link, but it is not clear in that post (or maybe its me overlooking everything) but to change the $ into % in includes/add_ccgvdc_application_top.php doesnt seem to work. i still get the 10$ voucher emailed after registering....

  4. #4
    jpf
    Guest


    Default

    In add_ccgvdc_application_top.php:
    // The settings below determine whether a new customer receives an incentive when they first signup
    //
    // Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');
    //
    A POSTIVE number is a DOLLAR OFF
    ZERO - IS NO signup bouns
    A NEGATIVE -is a % off

    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');
    $10 off next purchase.
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0');
    Nothing is generated/sent
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
    -10% (10% off) next purchase.


    Good Luck!

  5. #5
    altenter
    Guest


    Default

    jpf, thanks for clarifying, but still, as soon as a put a "-" like:
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
    i recieve no gift voucher upon registering

    other settings seem correct:

    define('FILENAME_GV_FAQ', 'gv_faq.php');
    define('FILENAME_GV_REDEEM', 'gv_redeem.php');
    define('FILENAME_GV_REDEEM_PROCESS', 'gv_redeem_process.php');
    define('FILENAME_GV_SEND', 'gv_send.php');
    define('FILENAME_GV_SEND_PROCESS', 'gv_send_process.php');
    define('FILENAME_PRODUCT_LISTING_COL', 'product_listing_col.php');
    define('FILENAME_POPUP_COUPON_HELP', 'popup_coupon_help.php');

    define('TABLE_COUPON_GV_CUSTOMER', 'coupon_gv_customer');
    define('TABLE_COUPON_GV_QUEUE', 'coupon_gv_queue');
    define('TABLE_COUPON_REDEEM_TRACK', 'coupon_redeem_track');
    define('TABLE_COUPON_EMAIL_TRACK', 'coupon_email_track');
    define('TABLE_COUPONS', 'coupons');
    define('TABLE_COUPONS_DESCRIPTION', 'coupons_description');


    // Set the length of the redeem code, the longer the more secure
    define('SECURITY_CODE_LENGTH', '10');
    //
    // The settings below determine whether a new customer receives an incentive when they first signup
    //
    // Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
    //
    // Set the coupon ID that will be sent by email to a new signup, if no id is set then no email
    define('NEW_SIGNUP_DISCOUNT_COUPON', '3');

  6. #6
    jpf
    Guest


    Default

    EDIT : create_account.php on about line 247
    // ICW - CREDIT CLASS CODE BLOCK ADDED ************************************************** ***** BEGIN
    if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
    $coupon_code = create_coupon_code();

    $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;


    CHANGE TO:

    // ICW - CREDIT CLASS CODE BLOCK ADDED ************************************************** ***** BEGIN
    if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT <> 0) {
    $coupon_code = create_coupon_code();


    I think..... Good Luck

  7. #7
    altenter
    Guest


    Default

    thanks jpf for your time,

    ok, now the gv is sent, but with a -10$ as amount, and doesnt count it in the total.

    im almost there, i can smell it

  8. #8
    altenter
    Guest


    Default

    jpf? anyone?

  9. #9
    Anonymous
    Guest


    Default

    not a lot of help but -10 works for me, as does 10 and as does 0

    what version are you running? want to paste the whole file?

  10. #10
    altenter
    Guest


    Default

    running ms2max1.55

    here's my add_ccgvdc_application_top.php:
    <?php
    define('FILENAME_GV_FAQ', 'gv_faq.php');
    define('FILENAME_GV_REDEEM', 'gv_redeem.php');
    define('FILENAME_GV_REDEEM_PROCESS', 'gv_redeem_process.php');
    define('FILENAME_GV_SEND', 'gv_send.php');
    define('FILENAME_GV_SEND_PROCESS', 'gv_send_process.php');
    define('FILENAME_PRODUCT_LISTING_COL', 'product_listing_col.php');
    define('FILENAME_POPUP_COUPON_HELP', 'popup_coupon_help.php');

    define('TABLE_COUPON_GV_CUSTOMER', 'coupon_gv_customer');
    define('TABLE_COUPON_GV_QUEUE', 'coupon_gv_queue');
    define('TABLE_COUPON_REDEEM_TRACK', 'coupon_redeem_track');
    define('TABLE_COUPON_EMAIL_TRACK', 'coupon_email_track');
    define('TABLE_COUPONS', 'coupons');
    define('TABLE_COUPONS_DESCRIPTION', 'coupons_description');

    // Below are some defines which affect the way the discount coupon/gift voucher system work
    // Be careful when editing them.
    //
    // Set the length of the redeem code, the longer the more secure
    define('SECURITY_CODE_LENGTH', '10');
    //
    // The settings below determine whether a new customer receives an incentive when they first signup
    //
    // Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
    define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
    //
    // Set the coupon ID that will be sent by email to a new signup, if no id is set then no email
    define('NEW_SIGNUP_DISCOUNT_COUPON', '3');


    ////
    // Create a Coupon Code. length may be between 1 and 16 Characters
    // $salt needs some thought.

    function create_coupon_code($salt="secret", $length = SECURITY_CODE_LENGTH) {
    $ccid = md5(uniqid("","salt"));
    $ccid .= md5(uniqid("","salt"));
    $ccid .= md5(uniqid("","salt"));
    $ccid .= md5(uniqid("","salt"));
    srand((double)microtime()*1000000); // seed the random number generator
    $random_start = @rand(0, (128-$length));
    $good_result = 0;
    while ($good_result == 0) {
    $id1=substr($ccid, $random_start,$length);
    $query = tep_db_query("select coupon_code from " . TABLE_COUPONS . " where coupon_code = '" . $id1 . "'");
    if (tep_db_num_rows($query) == 0) $good_result = 1;
    }
    return $id1;
    }
    ////
    // Update the Customers GV account
    function tep_gv_account_update($customer_id, $gv_id) {
    $customer_gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
    $coupon_gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
    $coupon_gv = tep_db_fetch_array($coupon_gv_query);
    if (tep_db_num_rows($customer_gv_query) > 0) {
    $customer_gv = tep_db_fetch_array($customer_gv_query);
    $new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];
    $gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "'");
    } else {
    $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");
    }
    }
    ////
    // Get tax rate from tax description
    function tep_get_tax_rate_from_desc($tax_desc) {
    $tax_query = tep_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . $tax_desc . "'");
    $tax = tep_db_fetch_array($tax_query);
    return $tax['tax_rate'];
    }
    ?>

Similar Threads

  1. Gift Voucher Questions
    By alexbranding in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 04-11-2005, 11:18 AM
  2. Gift Voucher checkout
    By harpon in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 07-30-2004, 11:00 AM
  3. Creating a Gift Voucher
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 06-14-2004, 05:55 AM
  4. Updated Gift Voucher mod?
    By DaisyO75 in forum osCMax v1.7 General Mods Discussion
    Replies: 1
    Last Post: 02-17-2004, 06:44 AM
  5. Gift Voucher texts
    By Lynoure in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 11-21-2003, 08:43 AM

Bookmarks

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
  •