Strider Posted November 12, 2003 Author Share Posted November 12, 2003 erick: what julia is trying to tell you is to modify the $order->info['total'] in your payment file in the process_button function and I believe she is correct. Why is that you might ask? Your payment module, from what you have stated, is expecting subtotal, shipping and tax instead of total as the amount your going to receive. How those figures are derived depend on your state and accounting rules, which is what we allow you to modify. If you need to change your subtotal to reflect your discount or gift voucher then I would suggest you take $order->info['total'] and subtract your tax and shipping from that to derive the subtotal that you present to your payment processor. But, if you do it in this way you might want to consider how your tax is setup because some payment companies check your tax against your subtotal and depending once again on your state and accounting rules will depend on how your tax and shipping is figured against a discount or gv or credit note. Now are you totally confused? Good luck. Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
EricK Posted November 13, 2003 Share Posted November 13, 2003 strider: I somehow got you on the wrong track ... Â Summary: My payment module completely ignores :( the GV and DC amounts. The payment module looks at $order->info['total'] just like all the other payment modules. It takes the order total directly from osCommerce within the before_process() function. Â Questions: 1.) Does GV modify the order total in process_button()? If so do need to grab the order total in process_button() and passes it back to the before_process() function in order to pass the correct amount to the payment gateway? Â 2.) My cart's $order->info['total'] is otherwise 100% correct, so could I simply subtract the GV and/or DC amount(s) from $order->info['total']? If so, how would that bit of code look in the payment module? Â whew! Quote Link to comment Share on other sites More sharing options...
Strider Posted November 13, 2003 Author Share Posted November 13, 2003 what is your php version Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
Strider Posted November 13, 2003 Author Share Posted November 13, 2003 joe I answered your email but it said I was spamming .. lol .. and no I don't have patience. Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2003 Share Posted November 13, 2003 Hi! Â I have only one real question at this point. I have started a new store and installed the mod into a clean setup (except for the affiliate mod). I setup a coupon for new users to get a one time discount of 30% and that works with no problem. The one thing is that there is duplication of the main text and the warning info when the email goes out. Is there a way to fix this? Â Thanks, Kevin Quote Link to comment Share on other sites More sharing options...
Strider Posted November 13, 2003 Author Share Posted November 13, 2003 yes it is already in the posts mystic  http://www.oscommerce.com/forums/index.php?sho...ic=52161&st=330 in catalog/create_account.php - i have some mods installed so i can't give you line number  Find this line  $email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;  and delete the EMAIL_TEXT bit so it looks like this    QUOTE $email_text .= EMAIL_CONTACT . EMAIL_WARNING;    regards  mark Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
penge Posted November 13, 2003 Share Posted November 13, 2003 Just started using the GV contribution, when someone buys a GV it does not appear in the voucher queue in admin?  The installation instructions are Now when the customer purchases a Gift Voucher it will be logged in a queue. The customer will not be able to use the Gift Voucher until you use the admin option to release it from the queue.If set to false the Gift Voucher will be immediately available to the customer.  Am I using an old conrtib, I don't have any true or false options in the Gift Voucher admin  I am also using flat rate shipping and it is being charged twice, once when the GV is purchaced and also when it is redeemed. How do I only charge for it once?  Any ideas  Penge Quote Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2003 Share Posted November 13, 2003 yes it is already in the posts mystic http://www.oscommerce.com/forums/index.php?sho...ic=52161&st=330  in catalog/create_account.php - i have some mods installed so i can't give you line number   Find this line  $email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;  and delete the EMAIL_TEXT bit so it looks like this    QUOTE? $email_text .= EMAIL_CONTACT . EMAIL_WARNING;    regards  mark Thanks Strider!  After going page by page, it would figure it was on the page after I gave up. <_<  I love the work you have done on this. :D  Kevin Quote Link to comment Share on other sites More sharing options...
EricK Posted November 13, 2003 Share Posted November 13, 2003 Strider Nov 12 2003, 09:40 PM: what is your php version  PHP Version: 4.2.3 (Zend: 1.2.0) Database: MySQL 3.23.58  Thanks, Eric Quote Link to comment Share on other sites More sharing options...
Strider Posted November 13, 2003 Author Share Posted November 13, 2003 erick are the totals of your orders being placed in your admin correctly? Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
spayce_girl Posted November 13, 2003 Share Posted November 13, 2003 Hello there. Here is my gift voucher issue. Warning: this isn't a basic install so my problem could be related to the conflict with other contributions. With that said, I ask that maybe someone could point me in the right direction where I can try to update the code. I'm not an expert buy I usually able to play around a bit to figure things out. Â Okay my issue is that when a customer purchases a gift voucher nothing is generated in the database. Where exactly does this occur in the files? I have backups of previous installations but I want to see if I can fix this without having to go back. Â The purchase goes through and everything but nothing is added to the queue. Quote Link to comment Share on other sites More sharing options...
penge Posted November 13, 2003 Share Posted November 13, 2003 spayce_girl  I have the same problem  Penge Quote Link to comment Share on other sites More sharing options...
spayce_girl Posted November 13, 2003 Share Posted November 13, 2003 Penge, has your installation ever worked? Or did this happen after you installed other contributions? Quote Link to comment Share on other sites More sharing options...
jpf Posted November 13, 2003 Share Posted November 13, 2003 And which CONTRIBUTION(S) was added. Was there and SQL file ran that MIGHT have overwitten something.....??? Quote Link to comment Share on other sites More sharing options...
EricK Posted November 13, 2003 Share Posted November 13, 2003 Strider: Nov 13 2003, 01:31 are the totals of your orders being placed in your admin correctly? Yes! The weird thing is that the orders are 100% correct on the checkout_confirmation.php page, in the admin and in the confirmation emails. Â The preauth amount run by the payment processor does not reflect GV or DC - all other variables are correct, i.e., order, shipping, tax. Â FYI: luder1 (Tim) still has this exact same prob. w/ Authorize.net. Â - Eric Quote Link to comment Share on other sites More sharing options...
penge Posted November 13, 2003 Share Posted November 13, 2003 spayce_girl  I can't be sure, I have only began using GV this week on a loaded 5 installation which is a couple of months old. I have added contributions, checking the db with phpmyadmin, I can't see anythihg I added conflicting with GV  Penge Quote Link to comment Share on other sites More sharing options...
Strider Posted November 14, 2003 Author Share Posted November 14, 2003 erick is your gv and/or dc being called before or after your call to your payment center does your payment code have a sort order or does it default to 0. That said what is your sort order? Since you have been playing in the code do you understand what the sort order does? Â spacey-girl and penge: do you have gv set to queue the purchase of the gv? also loaded 5 is made with 2.2.1 this version of the code was done with 2.2.2 so you can't update your loaded 5 with this code or 5.04 of the ccgv and above. you can set your queue in modules->order totals-> gift voucher Quote (my knowledge is so small you would think that an ant was a genius in comparison) Link to comment Share on other sites More sharing options...
applelinks Posted November 14, 2003 Share Posted November 14, 2003 joe I answered your email but it said I was spamming .. lol .. and no I don't have patience. is it possible to send that email to [email protected]   Thanks again  Joe Quote ---------------------------- Long Island, New York Link to comment Share on other sites More sharing options...
ari Posted November 14, 2003 Share Posted November 14, 2003 I installed the the GV-DC 5.06 today. Took me 2h and it works like a charm. Â I found the missing image in the admin area in this page button_report.gif thanks Quote Link to comment Share on other sites More sharing options...
luder1 Posted November 14, 2003 Share Posted November 14, 2003 erick is your gv and/or dc being called before or after your call to your payment center does your payment code have a sort order or does it default to 0. That said what is your sort order? Since you have been playing in the code do you understand what the sort order does? i don't know what the sort order means. can you elaborate on it and how to change it? me and erick have the same problem, however, i'm not elite enough to mess with the coding. Quote Link to comment Share on other sites More sharing options...
EricK Posted November 14, 2003 Share Posted November 14, 2003 IT WORKS, IT WORKS! Â Many thanks to Strider for supporting this contribution and to JuliaJ for helping me sort this out ... Â I give full credit to Dan Helfman, Senior Software Engineer, TrustCommerce for the solution. Dan wrote the TrustCommerce Payment Module. His personal attention to this issue, and help with other projects, is one of several reasons that we use TrustCommerce and refer our clients to TrustCommerce. They make our clients happy, and that makes us look good! [a well deserved plug :rolleyes: ] Â Apparently the GV/DC contribution prevents the payment module from accessing the necessary globals. So, after the process_button() function in the payment module, this code was needed: global $HTTP_POST_VARS, $order; Works perfectly, with sort order settings in Admin/Modules/Order Total: Â Discount Coupons 4 Gift Certificates 5 Low Order Fee Shipping 2 Sub-Total 1 Tax 3 Total 6 Â luder1 - You may want to pass this solution to your payment gateway. I hope this will also help you. Â Thanks again all, Eric_K :P Quote Link to comment Share on other sites More sharing options...
thooper Posted November 14, 2003 Share Posted November 14, 2003 Ok interesting things happening here. I would like to thank the developers of this mod. It's working like a charm.... almost ;) Â First, I am running a modded install which includes a dimensional shipping module for canada post, and a few home brew modifications. Â Now, the problem I am having is I can't seem to figure out 2 things. 1) I can't skip the shipping for a gift voucher. I've looked for enable downloads in the admin->configuration and can't find it. Maybe I am just overlooking it. I think this would solve all my problems. Â 2) I can't tell if a gift voucher is really created in my catalog. I create a gift voucher via catalog->new product with GIFT10 as my model number, value is $10. I still get shipping options presented even with a weight/dimension of 0lbs, 0hx0wx0d. Â Sooo... I think if I solve issue 1, issue 2 will go away. Any takers? Â PS I am having no problems what-so-ever with the email users features of the vouchers/coupons. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2003 Share Posted November 14, 2003 Ok interesting things happening here. I would like to thank the developers of this mod. It's working like a charm.... almost ;) First, I am running a modded install which includes a dimensional shipping module for canada post, and a few home brew modifications.  Now, the problem I am having is I can't seem to figure out 2 things. 1) I can't skip the shipping for a gift voucher. I've looked for enable downloads in the admin->configuration and can't find it. Maybe I am just overlooking it. I think this would solve all my problems.  2) I can't tell if a gift voucher is really created in my catalog. I create a gift voucher via catalog->new product with GIFT10 as my model number, value is $10. I still get shipping options presented even with a weight/dimension of 0lbs, 0hx0wx0d.  Sooo... I think if I solve issue 1, issue 2 will go away. Any takers?  PS I am having no problems what-so-ever with the email users features of the vouchers/coupons. 1) In the Configuration Box of Admin you have the option "Download" on the left side. Click that link and you will be presented four configuration options, one of them is "Enable download".  /Fred Quote Link to comment Share on other sites More sharing options...
penge Posted November 14, 2003 Share Posted November 14, 2003 spayce_girl  I have sorted out the queue problem with the GV.  Check - includes/add_application_top.php  DEFINE('GV_IMMEDIATE', false);  will queue all Gift Voucher purchases.  I still have the shipping cost taken out twice (I have flat rate shipping enabled) once when the GV is purchaced and also when it's redeemed. I have set 'Include shipping' to false in Modules/Order Total, but it has no effect!  Any ideas  Penge Quote Link to comment Share on other sites More sharing options...
Strider Posted November 14, 2003 Author Share Posted November 14, 2003 Erick I am glad you got your gv/dc working and I am also glad that whoever wrote your payment module stepped up to the plate and fixed their bug. But... the gv/dc contrib has nothing to do with whether your payment module can see the global you referred to with this statement Apparently the GV/DC contribution prevents the payment module from accessing the necessary globals. So, after the process_button() function in the payment module, this code was needed: CODEÂ global $HTTP_POST_VARS, $order; Quote (my knowledge is so small you would think that an ant was a genius in comparison) 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.
Note: Your post will require moderator approval before it will be visible.