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

When an international customer logs in, having Paypal only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 04-27-2005, 09:38 AM
 
Ryano Ryano is offline
 

Senior Member
  
Join Date: Jun 2004
Posts: 192
 

Default

Works perfect! Thanks a bunch dsparks!
__________________
xcart v3.5.8 (Unix)
and
xcart v4.0.13
Reply With Quote
  #12  
Old 06-20-2005, 06:02 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Moving this to the Custom Mods forum...good one!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #13  
Old 07-12-2005, 09:52 AM
 
Ryano Ryano is offline
 

Senior Member
  
Join Date: Jun 2004
Posts: 192
 

Default

Anyone know how to get this to work for version 4.0.14? I noticed that they made a few changes in the checkout.tpl because of the addition to the new Paypal Payment gateway. Here is the coding for my checkout.tpl in v 4.0.14. Can someone edit this for me? Thanks!

Code:
{* $Id: checkout.tpl,v 1.44.2.14 2005/06/17 06:27:11 svowl Exp $ *} {if $payment_data.payment_method ne ""} <H5>{$lng.lbl_payment_method}: {$payment_data.payment_method}</H5> {capture name=dialog} <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <FORM action="{$payment_data.payment_script_url}" method="post" name="checkout_form"> <INPUT type="hidden" name="paymentid" value="{$payment_data.paymentid}"> <INPUT type="hidden" name="action" value="place_order"> <TR><TD> <PRE> <FONT> {include file="customer/main/customer_details.tpl"} </FONT> </PRE> {if $paypal_express_active} {include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="return"} {else} {include file="buttons/modify.tpl" href="register.php?mode=update&action=cart&paymentid=`$smarty.get.paymentid`"} {/if} {if $ignore_payment_method_selection eq ""} <DIV align="right"> {include file="buttons/button.tpl" button_title=$lng.lbl_change_payment_method href="cart.php?mode=checkout"} </DIV> {/if} <INPUT type="hidden" name="{$XCARTSESSNAME}" value="{$XCARTSESSID}"> <SCRIPT> requiredFields = new Array(); </SCRIPT> {include file="check_required_fields_js.tpl"} {if $payment_data.payment_template ne ""} {include file=$payment_data.payment_template} {/if} {if $payment_cc_data.cmpi eq 'Y' && $config.CMPI.cmpi_enabled eq 'Y'} {include file="main/cmpi.tpl"} {/if} {include file="customer/main/checkout_notes.tpl"} <INPUT type="hidden" name="payment_method" value="{$payment_data.payment_method}"> {$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}". <P align="center"> {if $js_enabled} {assign var="button_href" value="javascript: "} {if $config.General.check_cc_number eq "Y" and ($payment_cc_data.type eq "C" || $payment_data.paymentid eq 1) and $payment_cc_data.disable_ccinfo ne "Y"} {assign var="button_href" value=$button_href|cat:"if(checkCCNumber(document.checkout_form.card_number,document.checkout_form.card_type) && checkExpirationDate(document.checkout_form.card_expire_Month,document.checkout_form.card_expire_Year)"} {if $payment_cc_data.disable_ccinfo ne "C"} {assign var="button_href" value=$button_href|cat:" && checkCVV2(document.checkout_form.card_cvv2,document.checkout_form.card_type)"} {/if} {assign var="button_href" value=$button_href|cat:")"} {/if} {assign var="button_href" value=$button_href|cat:" if(checkRequired()) document.checkout_form.submit()"} {include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if} </TD></TR> </FORM> </TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_details content=$smarty.capture.dialog extra="width=100%"} {elseif $payment_methods ne ""} {capture name=checkout_dialog} <FORM action="cart.php" method="POST" name="cartform"> <INPUT type="hidden" name="cart_operation" value="cart_operation"> {include file="customer/main/cart_contents.tpl"} <HR noshade size="1"> {include file="customer/main/cart_totals.tpl"} {if $js_enabled} {include file="buttons/update.tpl" href="javascript: document.cartform.submit()" js_to_href="Y"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_update}{/if} </FORM> {/capture} {include file="dialog.tpl" title=$lng.lbl_order_summary content=$smarty.capture.checkout_dialog extra="width=100%"} {capture name=dialog} <FORM method="get" action="cart.php" name="checkout_form"> {$lng.txt_payment_method}</p> <TABLE border="0" align="center" width="400"> {section name=payment loop=$payment_methods} <TR> <TD><INPUT type="radio" name="paymentid" value="{$payment_methods[payment].paymentid}"{if $payment_methods[payment].is_default eq "1"} checked{/if}></TD> {if $payment_methods[payment].processor eq "ps_paypal_pro.php"} <TD colspan="2"> <TABLE border="0" cellpadding="0" cellspacing="0"><TR> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="logo"}</TD> <TD></TD> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="text"}</TD> </TR></TABLE> </TD> {else} <TD nowrap>{$payment_methods[payment].payment_method}</TD> <TD>{$payment_methods[payment].payment_details|default:""}</TD> {/if} </TR> {/section} <INPUT type="hidden" name="mode" value="checkout"> </TABLE> <DIV align="center"> {if $js_enabled} {include file="buttons/continue.tpl" style="button" href="javascript: document.checkout_form.submit()"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_continue} {/if} </DIV> </FORM> {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_method content=$smarty.capture.dialog extra="width=100%"} {/if}
__________________
xcart v3.5.8 (Unix)
and
xcart v4.0.13
Reply With Quote
  #14  
Old 07-19-2005, 06:59 AM
 
Ryano Ryano is offline
 

Senior Member
  
Join Date: Jun 2004
Posts: 192
 

Default

Still looking for some help on getting this to work for 4.0.14. Anyone?
__________________
xcart v3.5.8 (Unix)
and
xcart v4.0.13
Reply With Quote
  #15  
Old 08-17-2005, 12:10 PM
 
Tuner Tuner is offline
 

eXpert
  
Join Date: Jan 2003
Location: Scottsdale Arizona
Posts: 245
 

Default

OK For the Revised 4.0.14 mod really a no brainer.

Find skin1/customer/main/checkout.tpl Line:98
Replace this code:
Code:
{section name=payment loop=$payment_methods} <TR> <TD><INPUT type="radio" name="paymentid" value="{$payment_methods[payment].paymentid}"{if $payment_methods[payment].is_default eq "1"} checked{/if}></TD> {if $payment_methods[payment].processor eq "ps_paypal_pro.php"} <TD colspan="2"> <TABLE border="0" cellpadding="0" cellspacing="0"><TR> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="logo"}</TD> <TD></TD> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="text"}</TD> </TR></TABLE> </TD> {else} <TD nowrap>{$payment_methods[payment].payment_method}</TD> <TD>{$payment_methods[payment].payment_details|default:""}</TD> {/if} </TR> {/section}

With This Code:
Code:
{if $userinfo ne "" and ($userinfo.s_country eq $config.Company.location_country)} {assign var="destination" value="L"} {else} {assign var="destination" value="I"} {/if} {section name=payment loop=$payment_methods} {if $destination eq "L" or ($destination eq "I" and $payment_methods[payment].payment_method eq "PayPal")} <TR> <TD><INPUT type="radio" name="paymentid" value="{$payment_methods[payment].paymentid}"{if $payment_methods[payment].is_default eq "1"} checked{/if}></TD> {if $payment_methods[payment].processor eq "ps_paypal_pro.php"} <TD colspan="2"> <TABLE border="0" cellpadding="0" cellspacing="0"><TR> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="logo"}</TD> <TD></TD> <TD>{include file="payments/ps_paypal_pro_express_checkout.tpl" paypal_express_link="text"}</TD> </TR></TABLE> </TD> {else} <TD nowrap>{$payment_methods[payment].payment_method}</TD> <TD>{$payment_methods[payment].payment_details|default:""}</TD> {/if} </TR> {/if} {/section}
__________________
\"Then again it could all be horse crap\"
by some old Guy.
4.013
Reply With Quote
  #16  
Old 03-16-2006, 02:17 PM
 
bsinger bsinger is offline
 

Member
  
Join Date: Sep 2004
Posts: 14
 

Default

To bring this issue back to life = I have just implemented it into my site and have been trying to figure out how to turn off PayPal for US customers and ON for International.

This has worked well to make international customers use PayPal only but I dont want/need US customers using PayPal ever.

What would need to be changed to remove PayPal from the L designation?

Thanks in advance
__________________
http://www.obsstore.com
XCart Gold 4.1.10
Apache
PHP Version 4.3.4
MySQL server 4.0.20-standard
MySQL client 3.23.49
Reply With Quote
  #17  
Old 05-14-2006, 11:59 PM
 
alru111 alru111 is offline
 

eXpert
  
Join Date: Dec 2005
Posts: 244
 

Default

Same question here. Is there a way to leave all other payment options for international customers but exclude paypal from US customers.
__________________
X-Cart version 4.0.19
Reply With Quote
  #18  
Old 05-31-2006, 02:00 PM
 
subzero subzero is offline
 

eXpert
  
Join Date: Mar 2005
Posts: 238
 

Default

great addy thanx
__________________
Version 4.0.17
Reply With Quote
  #19  
Old 09-15-2006, 05:16 PM
 
billstevens billstevens is offline
 

Member
  
Join Date: Oct 2004
Posts: 26
 

Default Re: When an international customer logs in, having Paypal only

Thanks a bunch guys - I was looking for just such code.
__________________
Bill
X-Cart 4.1.9
Reply With Quote
  #20  
Old 10-12-2006, 07:49 AM
 
Shopkeeper09 Shopkeeper09 is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 56
 

Question Re: When an international customer logs in, having Paypal only

Great mod!

Was wondering, has anyone successfully implemented this for version 4.0.18?
__________________
Moving over to a SaaS solution.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 06:04 AM.

   

 
X-Cart forums © 2001-2020