Guest Posted May 20, 2003 Share Posted May 20, 2003 Yes Ian,,,wiki to the rescue! LOL :lol: Quote Link to comment Share on other sites More sharing options...
fan4chevy Posted May 20, 2003 Share Posted May 20, 2003 i know I have the bug too where the payment options are checked even when the voucher pays the amount so not sure what version will check thanks. Quote Link to comment Share on other sites More sharing options...
Daemonj Posted May 20, 2003 Share Posted May 20, 2003 I also intend to revert back to having separate boxes for GV and discount coupon redeems. The current code that shows only one box is a pretty poor kludge and I can't abide the code that does that. It also may affect future credit class modules, so it has to go. Â I think that is a really good idea for another reason that may not have been thought of. What if a user has a GV and a DC to use on the same order? That is currently not possible. Having separate boxes for each resolves this dilemma! Â Take some Valerian Root and get a good 6 hours sleep and you will be amazed at how much better your mind and body works. ;) Quote "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein Link to comment Share on other sites More sharing options...
majestix Posted May 20, 2003 Share Posted May 20, 2003 Just a quick observation after installing 5.0.3: Â In adminincludesadd_ccgvdc_application_top.php look for: Â $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "'"); Â it should be: Â $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')"); Â (there is one bracket missing) Â Cheers and thanx Ian for this outstanding contribution! Â - D. Michael Quote Link to comment Share on other sites More sharing options...
Ian Posted May 20, 2003 Author Share Posted May 20, 2003 majestix,  Cheers, fixed in cvs  http://cvs.sf.net/cgi-bin/viewcvs.cgi/zenw...h_tag=branch_v5 Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
Redmanmike Posted May 20, 2003 Share Posted May 20, 2003 Ian,  DO you have two versions of the 5.0.3 going around   Just a quick observation after installing 5.0.3:   In adminincludesadd_ccgvdc_application_top.php look for:   $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "'");   it should be:   $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");   (there is one bracket missing)   I just downloaded the version here http://www.oscommerce.com/community/contributions,282  and the code in that file reads diffrent :   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'] . "'");   }  }  And if so which is the most recent?  Thank for the wonderful work. It's a piece of art :lol: Quote Link to comment Share on other sites More sharing options...
Ian Posted May 20, 2003 Author Share Posted May 20, 2003 You are right  DO you have two versions of the 5.0.3 going around  There must be two versions, the one I remember had no bugs at all in it :lol:  If you look at the last line of the code you posted     $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "'");  it should be     $gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')"); Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2003 Share Posted May 20, 2003 Ian, Â Where is the version that has "NO BUGS"? :D Quote Link to comment Share on other sites More sharing options...
Ian Posted May 20, 2003 Author Share Posted May 20, 2003 Melinda  It's there, but you need to get in the right frame of mind.  Drink 5 bottles of grolsch lager and then while downloading you must chant continually.  If peter piper picked a peck of pickled peppers, where's the peck of pickled peppers peter piper picked.  If you make a mistake with the chant you will be damned to the version with bugs :twisted: Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2003 Share Posted May 20, 2003 Ian, Â You must be tired...that's not my quote! :lol: Quote Link to comment Share on other sites More sharing options...
Redmanmike Posted May 20, 2003 Share Posted May 20, 2003 I guess thats what I get for looking to close LOL Â I was looking for 2 lines because thats the way it wraped in the first message..... Â I just need to step back and put on some sunscreen and aloe to protect form the radiation off the monitor. Â Cheers, Quote Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 hello, great mod Ian, i'm having one problem tho, everything seems to be working except paying from my GV account. Â i just bought ?30 of vouchers, they are showing in the account but when i want to purchase something with them i cant see any box to tick. what page should it be on? i hope someone can help bcos my php is zero :oops: Â thx Kinky. Quote Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 ooops.... also, when i make a new account it sends me a ?10 voucher, how can i stop this? Quote Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 double oops... decided to read the thread :) it was a sorting problem. great mod! thanks. Kinky. Quote Link to comment Share on other sites More sharing options...
Daemonj Posted May 21, 2003 Share Posted May 21, 2003 Ian, I have a suggestion regarding the GV FAQ page. Â As everyone likes things different ways, I wanted to put it here in the forum to get everyone else's opinion. Â Could you make the page have the FAQ topics at the top, then a horizontal rule, and then the contents of the FAQ? When a user clicks on a topic, they are moved to the appropriate bookmarked answer within the same page? Â I personally hate pages that make me click for every answer instead of being able to scroll through the list of answers. Such is the reason for my request. Â Let me know if the above does not make sense or if you would like any additional information. Quote "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein Link to comment Share on other sites More sharing options...
Guest Posted May 21, 2003 Share Posted May 21, 2003 Hi Ian all the rest, I am trying to get the GV contribution to work with the Paypal IPN (0.971) contribution and could use some ideas from you. My idea is to add the same GV code that you have added to checkout_process.php and checkout_confirmation.php to the Paypal IPN contribution.  As you pointed out before, the PayPal IPN contribution use it's own process and confirmation code, which is checkout_paypalipn.php and paypal_notify.php.  The things here is that paypal_notify.php is "redirected" from PayPal itself. This means that session vars may be old/deleted etc and you can not trust it's there anymore. My idea then is to update the file checkout_paypalipn.php with the same GV code. The file checkout_paypalipn.php contains code which save an order (with all products and attributes etc) to the database, unregister session vars and redirecting to PayPal. If you update the file checkout_paypalipn.php with:  <?php /*  $Id: checkout_paypalipn.php,v 0.971 2003-20-02 10:56:31 pablo_pasqualino Exp pablo_pasqualino $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com ... $order_total_modules->update->credit_account($i); ... $order_total_modules->apply_credit(); ... if ($credit_covers) $payment=''; $payment_modules = new payment($payment); $payment_modules->update_status(); $order_total_modules = new order_total; $order_total_modules->collect_posts(); $order_total_modules->pre_confirmation_check(); if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } if (is_array($payment_modules->modules)) {  $payment_modules->pre_confirmation_check(); } ... //unregister session vars $order_total_modules->clear_posts(); ... tep_redirect("https://www.paypal.com/cgi.....")  There is one issue (at least) with this and that is if a customer aborts the confirmation at PayPal then the GV and/or DC will be gone since the coupon/GV is marked as redeemed. I guess that if you inform about this then it's ok.  Any thoughts about this? All input on this is appreciated.  /Fred Quote Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 plz plz plz anyone know where i can enable or disable or even change the amount that new accounts get?? they currently get ?10. plz help :oops: Â plz i'm desperate. Quote Link to comment Share on other sites More sharing options...
Ian Posted May 21, 2003 Author Share Posted May 21, 2003 look in  catalog/includes/add_application_top.php or catalog/includes/add_ccgvdc_application_top.php if you have v5.03. Quote Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 your a star! thanks :) :rolleyes: Quote Link to comment Share on other sites More sharing options...
Kinky Clothes Posted May 21, 2003 Share Posted May 21, 2003 ok i can disable it, what would i need to do to give 10% instead of ?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'); Â how do i find a coupon id? does this mean i could make a new coupon in admin and assign that to emails? Â thx Kinky. Quote Link to comment Share on other sites More sharing options...
wvmlt Posted May 21, 2003 Share Posted May 21, 2003 I get the following error when truing to check out  Error! Unable to determine the page link!  How do I fix this? Quote Keith   What the hell was I thinkin'? Link to comment Share on other sites More sharing options...
alfaowner Posted May 21, 2003 Share Posted May 21, 2003 I respect your patience Ian, however, I am concerned to see so many people ask for answers in a demanding manner! I hope you recieve good amounts of Paypal donations... You deserve it! :oops: :shock: :roll: Quote Link to comment Share on other sites More sharing options...
devon Posted May 22, 2003 Share Posted May 22, 2003 Hello Ian,  I installed the v.503 and it works (untill now) without any promlems. With the new install file it is much easier. Thank you!!!  I have one question about some files. Do I still need the file gv_redeem.php, since when I click on it, it does not appear even though it is under catalog/gv_redeem.php. And what for is the file coupon_restrict?  Thank you in advance  Devon Quote Link to comment Share on other sites More sharing options...
iamcanadian2 Posted May 22, 2003 Share Posted May 22, 2003 I noticed something: I sent a gift voucher as a test. I redeemed the voucher from the email link, but I didn't log into my account & I closed the browser window. The funds from the coupon are gone. Â Is this fixed in the newest 5.03 version? (I am currently running 5.02) Quote Link to comment Share on other sites More sharing options...
infinityws Posted May 22, 2003 Share Posted May 22, 2003 Ian: Â What happens if the voucher makes the total payment worth $0? Â If I have Credit Card or paypal setup it still goes to the page. Â For now I've put in the cash option, but is there a way to add a comment or maybe your script can detect a total price of $0 and put a message to choose the cash option? 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.