ms-signs Posted June 5, 2008 Share Posted June 5, 2008 I added this contribution to my site, everything works except for the most important thing, it's not subtracting the coupon value. I search for support in english an couldn't find anything. this is the code I added to checkout_process; // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); // coupons addon start if (isset($ot_coupon) && is_object($ot_coupon) && $ot_coupon->redeem==true) { tep_db_query("insert into " . TABLE_COUPONS_SALES . " (coupons_code, customers_id, orders_id, date_purchased) values ('" . tep_db_input($ot_coupon->coupons_code) . "', '" . (int)$customer_id . "', '" . (int)$insert_id . "', now())"); tep_session_unregister('coupon_code_code'); tep_session_unregister('coupon_code_value'); } // coupons addon end require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> thank you. Quote Link to comment Share on other sites More sharing options...
Lady Sunshine Posted June 6, 2008 Share Posted June 6, 2008 goog morning, I have in my checkout_process.php following. It works very well. // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); // coupons addon start if (isset($ot_coupon) && is_object($ot_coupon) && $ot_coupon->redeem==true) { tep_db_query("insert into " . TABLE_COUPONS_SALES . " (coupons_code, customers_id, orders_id, date_purchased) values ('" . tep_db_input($ot_coupon->coupons_code) . "', '" . (int)$customer_id . "', '" . (int)$insert_id . "', now())"); tep_session_unregister('coupon_code_code'); tep_session_unregister('coupon_code_value'); } // coupons addon end tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> regards Diana Quote Link to comment Share on other sites More sharing options...
anthonykeane Posted June 6, 2008 Share Posted June 6, 2008 Hi all Quick question in relation to this add on. Is there a way to offer a coupon based on a percentage i.e. 20% off coupon rather than the current value based £2.50 etc? Thanks Anthony Quote Link to comment Share on other sites More sharing options...
ms-signs Posted June 6, 2008 Author Share Posted June 6, 2008 goog morning,I have in my checkout_process.php following. It works very well. // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); // coupons addon start if (isset($ot_coupon) && is_object($ot_coupon) && $ot_coupon->redeem==true) { tep_db_query("insert into " . TABLE_COUPONS_SALES . " (coupons_code, customers_id, orders_id, date_purchased) values ('" . tep_db_input($ot_coupon->coupons_code) . "', '" . (int)$customer_id . "', '" . (int)$insert_id . "', now())"); tep_session_unregister('coupon_code_code'); tep_session_unregister('coupon_code_value'); } // coupons addon end tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> regards Diana Hi Diana, Thank you for your help. I found the problem it was in the order total (display order) I had the coupon set to display last, this is why it was not subtracting from order. Thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted August 21, 2008 Share Posted August 21, 2008 I can't get the coupon box to show in checkout_payment.php It shows Coupon, but no box. I have this as the code: <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!--Coupon by Ingo--> <tr> <td class="main"><b><?php echo TEXT_COUPON_HEADING; ?></b></td> </tr> <tr> <td><?php require(DIR_WS_INCLUDES . 'boxes/coupon_payment.php'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!--End Coupon by Ingo--> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> Any Ideas why it's not showing? The tables are showing in my sql and I have coupons set up in my admin backend, and that's working. No error message, just no box. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2008 Share Posted August 23, 2008 I fixed it. There's a module you have to enable in payment modules in admin. There was nothing in the directions about that *slapping forhead*. Everythings working now. Quote Link to comment Share on other sites More sharing options...
dminor Posted August 28, 2008 Share Posted August 28, 2008 I fixed it. There's a module you have to enable in payment modules in admin. There was nothing in the directions about that *slapping forhead*. Everythings working now. what was the name of the module? I've run into the same issue. Thanks! Quote Link to comment Share on other sites More sharing options...
dminor Posted August 28, 2008 Share Posted August 28, 2008 I have also installed this contribution, but see no location in the admin tool to add in codes to be redeemed. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2008 Share Posted August 28, 2008 I have also installed this contribution, but see no location in the admin tool to add in codes to be redeemed. Any suggestions? It's in the Catalog section in Admin. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2008 Share Posted August 28, 2008 what was the name of the module? I've run into the same issue. Thanks! In Admin, go to Modules, then Order Total. You'll see Coupons. Click on it. Quote Link to comment Share on other sites More sharing options...
dminor Posted August 28, 2008 Share Posted August 28, 2008 Ok got it. Unfortunately, it provided this: 1054 - Unknown column 'coupons_id' in 'field list' select coupons_id, coupons_code, coupons_notice, coupons_value, coupons_min_order, coupons_date from coupons order by coupons_id limit 0, 4 [TEP STOP] Any ideas? Quote Link to comment Share on other sites More sharing options...
dminor Posted August 28, 2008 Share Posted August 28, 2008 Somewhat unrelated, is there a way to correct how it displays on the website? www.cupkozy.com is the URL, it's on the left column, but looks funky (for lack of a better term) Quote Link to comment Share on other sites More sharing options...
dminor Posted September 1, 2008 Share Posted September 1, 2008 bump. Anyone? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2008 Share Posted September 1, 2008 Ok got it. Unfortunately, it provided this: 1054 - Unknown column 'coupons_id' in 'field list' select coupons_id, coupons_code, coupons_notice, coupons_value, coupons_min_order, coupons_date from coupons order by coupons_id limit 0, 4 [TEP STOP] Any ideas? Make sure you copied the code over correctly. It looks like you don't have everything copied over right. Did you add the sql to your database??? BTW: You better read my sig. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2008 Share Posted September 1, 2008 Somewhat unrelated, is there a way to correct how it displays on the website? www.cupkozy.com is the URL, it's on the left column, but looks funky (for lack of a better term) That's your particular css and template. You'll have to contact your template provider for that information. Quote Link to comment Share on other sites More sharing options...
dminor Posted September 1, 2008 Share Posted September 1, 2008 BTW: You better read my sig. Read it, but when I said help, I meant from anyone. lol But thank you for your replies. Quote Link to comment Share on other sites More sharing options...
paq1200 Posted September 13, 2008 Share Posted September 13, 2008 when i try to add a coupon i get this in the admin --> Fatal error: Call to undefined function: ctype_graph() in c:\apache\htdocs\admin\coupons.php on line 37 can someone tell me what this means. I can add the coupon going through phpmyadmin but not through the admin. the only other problem i am having is that the total is not right. where might i look for the total not being right. Thanks Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted September 13, 2008 Share Posted September 13, 2008 Looks like you did not install a file containing the function ctype_graph when you installed the contribution. Recheck your installation. Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
paq1200 Posted September 13, 2008 Share Posted September 13, 2008 Looks like you did not install a file containing the function ctype_graph when you installed the contribution. Recheck your installation. I have been through the install instructions for several different versions and i cant find for the life of me what is going on. Will the function be in admin/includes/functions? or admin/coupons? Thanks Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted September 13, 2008 Share Posted September 13, 2008 Just reinstall all the new ones in the correct place and check you amended those that needed amending Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
KimptonComputers Posted November 20, 2008 Share Posted November 20, 2008 Hi All, I have installed this contribution, and all is now working (not at first, also needed to install coupon module in the order payment, thanks for the hint) The problem I have is that PayPal is not deducting the coupon value. I have tried the coupon in all 5 positions in the "order total modules". The discount appears correctly in the checkout page and the sums are correct, but once it gets to PayPal the coupon isn't applied. Is this an issue with this module or within the PayPay payments page settings? What order do you have your "order total modules" in? Please help. All the best, Phil Quote Link to comment Share on other sites More sharing options...
KimptonComputers Posted November 20, 2008 Share Posted November 20, 2008 Just a thought, Does PayPal_IPN require a line to include the coupon reduction? Something like this? (code from paypal_ipn.php) $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); Please advise Phil Quote Link to comment Share on other sites More sharing options...
KimptonComputers Posted November 20, 2008 Share Posted November 20, 2008 Hi All, I have found this: http://www.pdncommunity.com/pdn/board/mess...d=1929990#M1668 It suggests that it is not passable to use the coupons in this fashion with PayPal IPN If you know differently, please advise. Phil Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.