Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

restrict payment method according to country? Rate Topic   - - - - -

 
  • bpaulette
  • Senior Member
  • Members
  • Join Date: 22-Feb 07
  • 156 posts

Posted 06 March 2007 - 07:07 PM #1

Is there a way to dictate which payment methods are available according to which country the customer lives in?

I'm trying to find a way to limit credit card payment to only people living in the US, and give international customers other methods to complete payment. Anyone know how I could do this?
----------------------------
CS-Cart v. 1.3.4 sp2

Dell PowerEdge Servers and Server Parts & Accessories

 
  • Zyles
  • Senior Member
  • Members
  • Join Date: 06-Nov 06
  • 596 posts

Posted 06 March 2007 - 11:04 PM #2

No, but you can pray for it to be included in a future version. I'd like this too.
Marketing tip:

Did you know a targeted e-mail marketing campaign can bring conversion rates up to 3.9%? By using reliable e-mail marketing software you can upsell to existing customers on a tight budget. If you are not using e-mail marketing you are missing out big time. I recommend and use Aweber.

 
  • bholland
  • Senior Member
  • Members
  • Join Date: 16-May 06
  • 129 posts

Posted 07 March 2007 - 01:01 AM #3

It doesn't seem like the logic for this would be too hard to add...You might end up having to hard code it into the PHP for a quick and dirty way. Having an admin side to "assign" payment options to certain countries would definitely be a bit more complex.

B

 
  • Zyles
  • Senior Member
  • Members
  • Join Date: 06-Nov 06
  • 596 posts

Posted 07 March 2007 - 11:56 AM #4

I believe it can be quick n' dirty done with just template coding. I have not tried yet however. And the logic is definetly there for CS-Cart to easily implement this in the back-end.
Marketing tip:

Did you know a targeted e-mail marketing campaign can bring conversion rates up to 3.9%? By using reliable e-mail marketing software you can upsell to existing customers on a tight budget. If you are not using e-mail marketing you are missing out big time. I recommend and use Aweber.

 
  • Casey L.
  • Member
  • Members
  • Join Date: 20-Feb 08
  • 57 posts

Posted 01 September 2008 - 03:01 PM #5

I managed to figure out that the printing of paymet method in checkout page is in skin/basic/customer/cart_pages/payment_method.tpl. However, I am not able to figure out how to extract the shipping-to country and billing-to country from the checkout page in order to create a "if" loop.

Appreciate if anyone could help me in implement the proper codes.

Thanks

{foreach from=$payment_methods item="pm" name="pay"}
<tr style="height: 20px;">
<td>
<input type="radio" id="payment_method_{$pm.payment_id}" name="payment_id" value="{$pm.payment_id}"
{if $pm.payment_id == 25 || bill-to.country==singapore || ship-to.country== singapore}
{if $cart.payment_id == $pm.payment_id || (!$cart.payment_id && $smarty.foreach.pay.first)}
{assign var="selected_payment_id" value=$pm.payment_id}
{assign var="selected_payment_surcharge_value" value=$pm.surcharge_value|default:'0'}
checked="checked"
{/if}
onclick="{if $settings.General.one_page_checkout == 'Y'}
{if !'HTTPS'|defined && $pm.protocol == 'https'} order_form.use_ajax = false;
{/if}sf_form.clear_onsubmit(); order_form.submit();{/if} fn_set_payment_surcharges('{$cart.total}', '{$pm.surcharge_value|default:'0'}')"
{/if} /></td>
<td><label for="payment_method_{$pm.payment_id}"><b>{$pm.payment}</b></label></td>
<td> </td>
<td>{$pm.description}</td>
</tr>
{/foreach}



 
  • baballuci
  • Senior Member
  • Members
  • Join Date: 02-Mar 06
  • 969 posts

Posted 02 September 2008 - 10:58 AM #6

Try something like
{if $pm.payment_id == 25 || $cart.user_data['b_country'] == 'SGP' || $cart.user_data['s_country'] == 'SGP'}

Charlie

 
  • Casey L.
  • Member
  • Members
  • Join Date: 20-Feb 08
  • 57 posts

Posted 03 September 2008 - 09:21 AM #7

Thanks for the help, baballuci

Got it done.

 
  • leeshields
  • Member
  • Members
  • Join Date: 09-Nov 10
  • 69 posts

Posted 20 April 2011 - 08:41 AM #8

Hi All

Sorry to resurrect an old thread but I need to do this asap

I need to restrict Paypal to UK only, I've tried adding this to the checkbox code but it still shows

{if $pm.payment_id == 12 && $cart.user_data['b_country'] == 'gbp' && $cart.user_data['s_country'] == 'gbp'}

Can anyone help? I don't want to go down the localizations route as it will mean half rebuilding the site!

Thank you


Lee

 
  • E.Qi.Librium
  • Senior Member
  • Members
  • Join Date: 05-Sep 09
  • 472 posts

Posted 20 April 2011 - 01:53 PM #9

I'm interested in a solution for this also, is there some genious capable of encoding a solution?

Thanks ;)

 
  • leeshields
  • Member
  • Members
  • Join Date: 09-Nov 10
  • 69 posts

Posted 20 April 2011 - 03:37 PM #10

I solved this here

http://forum.cs-cart...7886#post117886

Didn't realise when I posted this was a version one area of the forum


Lee

 
  • E.Qi.Librium
  • Senior Member
  • Members
  • Join Date: 05-Sep 09
  • 472 posts

Posted 20 April 2011 - 04:17 PM #11

But I think the ideal solution would be not to show certain payments methods att all depending on customer country instead of only deny them

 
  • leeshields
  • Member
  • Members
  • Join Date: 09-Nov 10
  • 69 posts

Posted 20 April 2011 - 04:19 PM #12

Just leave the text out....

But I have paypal banners on my site so don't want it to just disappear as users may be confused

Lee