JonCloud Posted June 14, 2004 Posted June 14, 2004 Hello Fellow Webheads, B) As a general rule, we only accept credit cards for international orders through PayPal, or wire transfer. But lately I have had a couple of international orders placed using a credit card, because the option was there in the checkout. What I want to do is have one set of payment options for US orders, and another set of options for International orders. Any ideas on how to do that?? Jason@ deeptronics.com Quote
JonCloud Posted June 16, 2004 Author Posted June 16, 2004 Cmon Guys....Help me out here. I am sure that there would be alot of support for a contribution that enabled you to choose payment options based on geographical location. I want my international customers to be able to choose Paypal, Check/ Money Order, or Bank Transfer if order is over $1000.00. I want my US customers to have those options plus my credit card option. Has anyone had any experience or seen anything relating to this idea? I would appreciate any feedback, JAson aka JonCloud Quote
gazzzzzza Posted August 2, 2004 Posted August 2, 2004 right had a quick look for you it seems to me that the payment modules appear depending on this codes outcome if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_CC_ZONE > 0) ) { now what you could do as a fix: (might not be the best way) add into that query which is in every payment module in the includes/modules/'payment/ folder: (example and not correct code but hopefully you get the idea) && (customer_country = 'id of USA') to get this to work, you may need to select the customers country before you run that code as i doubt whether it will be stored in an array anywhere. i suggest you get this data at the top of the page 'checkout_payment.php' one final point: this code '((int)MODULE_PAYMENT_CC_ZONE > 0)' may already do something similar to what you want, but i have not explored exactly what it does <_< Quote always here to offer some useless advice....
JonCloud Posted February 23, 2005 Author Posted February 23, 2005 Thanks! I am ready to make this happen. It absolutely has to! In my business, we are experiencing far too many cases of stolen credit card orders coming from international locations. Overseas orders are a big part of my business, and I don't want to exclude them, but I do want to only present them with options that will ensure a safer transaction. Namely, if they are NOT from the USA, then they do NOT get the option to input a credit card number. Instead, they are directed to use paypal, check/ money order, or bank transfer. But if they are from the USA, then the credit card option DOES appear, along with the other payment methods as well. I am not a php wiz. Actually, I am only slightly familiar with PHP syntax, but have successfully installed many mods. So I can follow instructions well. Can you or someone else help walk me through this? I don't fully understand what I need to do. Perhaps someone can explain it like the instructions in a contribution? I am looking for a solution and will trade favors or something else if you would like to get that solution. Please help if you can. Can someone look into it and contact me? Here is my website: www.deeptronics.com My email is: [email protected] Thanks!! Jason right had a quick look for you it seems to me that the payment modules appear depending on this codes outcome if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_CC_ZONE > 0) ) { now what you could do as a fix: (might not be the best way) add into that query which is in every payment module in the includes/modules/'payment/ folder: (example and not correct code but hopefully you get the idea) && (customer_country = 'id of USA') to get this to work, you may need to select the customers country before you run that code as i doubt whether it will be stored in an array anywhere. i suggest you get this data at the top of the page 'checkout_payment.php' one final point: this code '((int)MODULE_PAYMENT_CC_ZONE > 0)' may already do something similar to what you want, but i have not explored exactly what it does <_< <{POST_SNAPBACK}> Quote
gazzzzzza Posted March 2, 2005 Posted March 2, 2005 Hi Sorry for the delayed response but I wasn't expecting messages directed specifically at me!! Havent been on this forum for ages! basically americas country id by default appears to be 223 (in the countries database table) You need to use this so (in english) the payment options page loads like so - get payment modules in a loop - if module is Credit Card - check if country code of customer = americas code (223) - if it does then display payment module - else do nothing - move onto next payment module - end loop ill have a look at some of the code for this for you a little later today hopefully but i am right in the middle of something at the moment so i cant do it right now. Sorry again for the delay. Quote always here to offer some useless advice....
JonCloud Posted March 2, 2005 Author Posted March 2, 2005 Thats awesome! Thanks! And if theres anything I can do for you, let me know! Jason Hi Sorry for the delayed response but I wasn't expecting messages directed specifically at me!! Havent been on this forum for ages! basically americas country id by default appears to be 223 (in the countries database table) You need to use this so (in english) the payment options page loads like so - get payment modules in a loop - if module is Credit Card - check if country code of customer = americas code (223) - if it does then display payment module - else do nothing - move onto next payment module - end loop ill have a look at some of the code for this for you a little later today hopefully but i am right in the middle of something at the moment so i cant do it right now. Sorry again for the delay. <{POST_SNAPBACK}> Quote
gazzzzzza Posted March 2, 2005 Posted March 2, 2005 right i think i have sussed it for you. the file you need to edit is includes/modules/payment/cc.php near the top it should say $this->code = 'cc'; $this->title = MODULE_PAYMENT_CC_TEXT_TITLE; $this->description = MODULE_PAYMENT_CC_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_CC_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false); underneath that, I hope the following code will allow you to say "if user has set delivery address to america then offer credit card, if not then do not show ccard". Note that I have put in the default USA code of 223. If you want to add extra codes to be allowed that should be easy, just add an AND to the if statement. if($_SESSION['customer_country_id']==223) { $this->enabled = true; } else { $this->enabled = false; } Have a play with that and let me know how it goes. Quote always here to offer some useless advice....
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.