Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Payment Options based on Country

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-17-2012, 03:09 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Payment Options based on Country

I have been looking around the forum and have not found a good answer to this yet. in X-cart 4.5.x I want use our Aut.net payment gateway to process orders for all US and CA customers. Any other country we want to use a "Phone" method so we can do in-house verification before sending out orders.

It sounds easy enough since I have done something similar with shipping on older versions. If anyone can get me pointed in the right direction I would appreciate it. I would like to use data in the Billing and Shipping address as the standard for what rates are available.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #2  
Old 12-17-2012, 07:53 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Payment Options based on Country

This is possible, but can be very tricky. I have accomplished this for one of my clients, and it required me to include reloading the payment methods via Ajax. I think the burning question here is: are you using OPC or Fast lane checkout?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 12-17-2012, 07:59 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: Payment Options based on Country

We are using OPC. I initially thought this would be a simple IF/Then function but the AJAX does present a complication to the whole matter that I hadn't really considered.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #4  
Old 12-17-2012, 08:06 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Payment Options based on Country

The easiest way would be to use membership. It will require you to modify some code but I think at the end is the best way to do this. This will only work if you do not use memberships though. You can create 2 membership groups - say North America and World. Assign payment method CC to North America membership and payment method phone to World memberhsip. Now you need to modify register.php to auto assign membership to every customer when creating profile based on billing address (or shipping, whichever you want to use). XC should pick it up from there showing correct payment method(s).

This is untested, just an idea, but it should work
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 12-17-2012, 08:17 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: Payment Options based on Country

Thanks for the idea Steve, I hadn't considered using memberships that way. We were considering bringing in line pricing for regular customers in the coming year and I had originally thought about using memberships that way. But if there is another way to get around that it may be worth looking into.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #6  
Old 12-17-2012, 08:22 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Payment Options based on Country

If you are planning to use membership for pricing levels or discounts or anything like that then this won't work as you cannot assign more than one membership to customer.

Another way would be to custom code this and allow to assign payment methods based on country - similar to membership, which should not be that hard considering XC is open source
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 12-17-2012, 08:42 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: Payment Options based on Country

Where would I start looking for that? I've been toying with payment_methods.tpl from another thread I found, but when I start futzing with the IF statements the payment the results have been un-promising. Possibly because I have not considered the AJAX element as referenced above. While it is probably easy enough to learn, AJAX is something I'm just unfamiliar with.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #8  
Old 12-17-2012, 09:11 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Payment Options based on Country

It has to be done in php file not template file
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 01-18-2013, 08:32 AM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Re: Payment Options based on Country

I was able to eventually get this accomplished with some help from a programmer. We ended up having to modify a dozen php files to get it to work correctly.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote
  #10  
Old 06-22-2015, 07:35 AM
 
d4web d4web is offline
 

Member
  
Join Date: May 2009
Posts: 24
 

Default Re: Payment Options based on Country

Quote:
Originally Posted by cflsystems
It has to be done in php file not template file

Steve, I need this functionality on a website. Can you help with it?
__________________
Many sites and many different versions.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:42 AM.

   

 
X-Cart forums © 2001-2020