Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  1. #21
    Join Date
    Mar 2009
    Posts
    380
    Plugin Contributions
    0

    Default Re: Gift Certificate not Crediting

    Ajeh,

    Wow. I see the Gift Certificate box with the choice of "Apply Amount" or use redemption code. I am very impressed at the versatility and clarity of this Gift Certificate process once I am comprehending it and seeing it in action. This is really a magnificent accomplishment of the Zen team. I really cannot say enough about how great it is. It gives one so much flexibility.

    I just want to repeat the above many times.

    Thank you so much for solving this sort order problem for me. I guess I am timid about changing things and experimenting and am so appreciative of your knowledge and great support.

    You really cannot imagine how deeply I am impressed that the wonderful ease of how this works, especially after all my efforts to comprehend it and try to explain it to my so far nonexistent customers.

    Notageek

  2. #22
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Gift Certificate not Crediting

    You are most welcome ... we have tried to make Zen Cart work to fulfill the needs of a vast number of store owners from the beginner to advanced ...

    When in doubt there is the Free Support Forums ...

    Thanks for the update that all is working well for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #23
    Join Date
    Mar 2009
    Posts
    380
    Plugin Contributions
    0

    Default Re: Gift Certificate not Crediting

    Because it is a matter new to me, I would like to point out to others that in purchasing a gift, it does go straight into one's customer account on being released.

    This is a different process than receiving a gift certificate purchased by others, where the email is the source of a redemption code and an alternative link to redeem it into one's account.

    I didn't expect it to just go into my account like that, because I had sent my test customer a gift certificate to "play with," and thought purchasing the certificate would provide a similar type of email; however, it does not.

    It is so straightforward for it to go right into the purchaser's account. How well thought out that is. It's truly a wonderfully simple solution.

  4. #24
    Join Date
    Jul 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Gift Certificate not Crediting

    I has created one coupon code, while i applies it at checkout time i get message "Congratulations you have redeemed the Discount Coupon" but the amount is not deducting from the total.

    Please replay me if any one have an idea.

  5. #25
    Join Date
    Oct 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Gift Certificate not Crediting

    I too am having a similar problem with Customers.

    Many of my customers are complaining of this:

    1. We email them out a Gift Certificate
    2. During checkout they Get to Step 2 Payment information and enter in the Redemption Code, select a payment method and Continue Checkout
    3. On Page 3 Confirm Order they get a nice little dialogue saying success but the Apply Amount is not credited. They have to browse back to see an available credit and somewhere to enter the Apply Amount. Most don't and we get unhappy customers.

    Is there a way to have the Redeem button at this point which will refresh the Step 2 Payment display and therefore show the Apply Amount OR if they redeem during checkout just set the Apply Amount equal to this value when you go to Page 3 Continue Checkout

    Thanks

  6. #26
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Gift Certificate not Crediting

    You could customize the Modules ... Order Totals ... Gift Certificates ot_gv and change the credit_selection() to include something like:
    Code:
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS . '<br />' . zen_image_submit(BUTTON_IMAGE_REDEEM, BUTTON_REDEEM_ALT),
    so that there will be a redeem button there for those that do not hit enter ...

    They can then add how much they want to apply to the order ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #27
    Join Date
    Oct 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Gift Certificate not Crediting

    That did the trick thanks Linda.

    Sightly modified it so Redeem and Redeption Code are on separate lines

    Code:
    'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS. '<br />' . zen_image_submit(BUTTON_IMAGE_REDEEM, BUTTON_REDEEM_ALT). '<br />',
    and updated the instructions to explain.

    Awesome !!!!

  8. #28
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Gift Certificate not Crediting

    Be sure to test that code as I did not ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  9. #29
    Join Date
    Feb 2011
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion Re: Gift Certificate not Crediting

    I am reviving an old thread, sorry about that.

    I am using 1.3.9g. I did some code change to ot_gv.php to achieve this, without adding the button or showing the Apply Credit box always.

    Change is to collect_posts()

    Here is the entire function code:
    function collect_posts() {
    global $db, $currencies, $messageStack;
    // if we have no GV amount selected, set it to 0
    if (!$_POST['cot_gv']) $_SESSION['cot_gv'] = '0.00';
    // if we have a GV redemption code submitted, process it
    if ($_POST['gv_redeem_code']) {
    // check for validity
    $_POST['gv_redeem_code'] = preg_replace('/[^0-9a-zA-Z]/', '', $_POST['gv_redeem_code']);
    $gv_result = $db->Execute("select coupon_id, coupon_type, coupon_amount from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_prepare_input($_POST['gv_redeem_code']) . "'");
    if ($gv_result->RecordCount() > 0) {
    $redeem_query = $db->Execute("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . (int)$gv_result->fields['coupon_id'] . "'");
    // if already redeemed, throw error
    if ( ($redeem_query->RecordCount() > 0) && ($gv_result->fields['coupon_type'] == 'G') ) {
    $messageStack->add_session('checkout_payment', ERROR_NO_INVALID_REDEEM_GV, error);
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }
    } else {
    // if not valid redemption code, throw error
    $messageStack->add_session('checkout_payment', ERROR_NO_INVALID_REDEEM_GV, error);
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }
    // if valid, add redeemed amount to customer's GV balance and mark as redeemed
    if ($gv_result->fields['coupon_type'] == 'G') {
    $gv_amount = $gv_result->fields['coupon_amount'];
    // Things to set
    // ip address of claimant
    // customer id of claimant
    // date
    // redemption flag
    // now update customer account with gv_amount
    $gv_amount_result=$db->Execute("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . (int)$_SESSION['customer_id'] . "'");
    $customer_gv = false;
    $total_gv_amount = $gv_amount;;
    if ($gv_amount_result->RecordCount() > 0) {
    $total_gv_amount = $gv_amount_result->fields['amount'] + $gv_amount;
    $customer_gv = true;
    }
    $db->Execute("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $gv_result->fields['coupon_id'] . "'");
    $db->Execute("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $gv_result->fields['coupon_id'] . "', '" . (int)$_SESSION['customer_id'] . "', now(),'" . $_SERVER['REMOTE_ADDR'] . "')");
    if ($customer_gv) {
    // already has gv_amount so update
    $db->Execute("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $total_gv_amount . "' where customer_id = '" . (int)$_SESSION['customer_id'] . "'");
    } else {
    // no gv_amount so insert
    $db->Execute("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . (int)$_SESSION['customer_id'] . "', '" . $total_gv_amount . "')");
    }
    // zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_REDEEMED_AMOUNT. $currencies->format($gv_amount)), 'SSL'));
    $messageStack->add_session('redemptions',ERROR_REDEEMED_AMOUNT. $currencies->format($gv_amount), 'success' );
    // if we have no GV amount selected, set it to total GV value
    if ((!zen_not_null(ltrim($_SESSION['cot_gv'], ' 0')) || $_SESSION['cot_gv'] == '0')) $_SESSION['cot_gv'] = $total_gv_amount;
    }
    }
    if ($_POST['submit_redeem_x'] && $gv_result->fields['coupon_type'] == 'G') zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL'));
    }

    I just added the lines in bold. Its very simple; if the user entered a Redeem code, it sets the "cot_gv" session variable to the total value of the GV for the customer.

    Below are the test cases:
    1. New GV; without existing balance: It applied the GV amount on checkout page.
    2. New GV with existing GV balance: It applied the Total amount, new + existing balance (if the GV total was over; it retained the balance in the account).
    3. No GV, straight checkout, worked fine.
    4. No GV, with existing balance. Did not enter amount in the box; did not take it; charged the full amount.
    5. No GV, with existing balance, entered amount in the box; deducted it
    6. Existing balance, if we enter amount over the allowed amount, it throws an error.

    Not sure if I missed any test cases. If I did, please let me know.

    Zen-cart Guru's: If you see an issue with the logic, please chime in.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Change all references of 'Gift Certificate' to 'Gift Voucher'
    By crashtackle in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Jan 2010, 08:21 PM
  2. coupon for free gift with gift certificate purchase?
    By tkepler in forum Creating Discounts/Coupons, Gift Certificates, Newsletters
    Replies: 1
    Last Post: 24 Jul 2008, 03:31 PM
  3. Want to use a printed gift certificate (with code) in the gift certificate process?
    By HelenSama in forum Creating Discounts/Coupons, Gift Certificates, Newsletters
    Replies: 9
    Last Post: 15 Apr 2008, 02:04 PM
  4. Disable buying gift certificate with a gift certifcate
    By eaglewu in forum Creating Discounts/Coupons, Gift Certificates, Newsletters
    Replies: 1
    Last Post: 28 Jan 2007, 04:46 AM
  5. Gift Certificate Order with no Gift Certificate?
    By Jeff_Mash in forum Bug Reports
    Replies: 20
    Last Post: 14 Oct 2006, 09:10 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
  •