2017-04-03 2 views
0

짧은 버전 :
미국 내 48 세 미만 사용자는 Paypal을 결제 방법으로 만 받겠습니다.

이 옵션은 이미 bigcommerce에 결제 옵션으로 설치되어 있으며 드롭 다운 메뉴의 선택에 따라 해당 지불 게이트웨이를 숨기는 기능이 아닙니다.

불행히도 나는 충분히 큰 커머스를 모른다. 그러나 나는 많은 문제없이 x- 카트와 같은 다른 카트에 이것을 코드화 해 냈다. 누군가가 이것을 경험했거나 나를 위해 고치는가?

현재 Google은 판매자 계정을 통해 결제 할 때 미국 이외의 국가에있는 판매자에게 지급을 중단하고 Google 사이트에 배너를 게시했으나 사람들이 그 곳에 앉아서 CC 정보를 12,000 번 홍수에 범했습니다 캡처 경고 -_- 미리
덕분에 내 메일 박스

Currnetly 초석 1.5 테마를 실행BigCommerce : 국가 별 지불 옵션 제한

답변

0

한 가지 가능한 솔루션은 배송 또는 청구 국가 중 하나를 읽고 다음 관련 지불을 표시하기 위해 자바 스크립트를 사용할 수 행동 양식. 여기

는 특정 요소를 선택 (대상 요소에 대한 적절한 선택기를 결정하기 위해 브라우저의 개발자 도구를 사용)하는 방법을 알고 가정 개념 예입니다 ..

/** 
* This example binds a change event to the shipping country input dropdown, 
* so whenever a country is selected or changed, this code will show the relevant 
* payment methods. 
* NOTE: The change method here might not work if the payment methods section 
* is inaccessible at the time of country selection, at which point you should 
* modify the code to read the country at the time of DOM load for the payment methods. 
*/ 

//** Whenever the shipping country is selected or changed **// 
$("#shipping_country_dropdown").change(function() { 
    // Hide/Clear all visible payment options: 
    $(".payment_methods :input").each(function() { 
    $(this).hide(); 
    }); 
    togglePaymentMethodsByCountry($(this).find('option:selected').text()); 
}); 

/** 
* Displays specific payment methods depending on the customer's selected billing or shipping country. 
* You set the list of countries and their allowed payment methods here. 
* @param country String - The customer selected country. 
* @return Void 
*/ 
function togglePaymentMethodsByCountry(country) { 
    //** Define your country/payment options here, countries in caps **// 
    switch(country.toUpperCase()) { 
    case "UNITED STATES OF AMERICA": 
     $('#payment_method_1').show(); 
     $('#payment_method_2').show(); 
     $('#payment_method_3').show(); 
     break; 
    case "CANADA": 
     $('#payment_method_1').show(); 
     $('#payment_method_2').show(); 
     break; 
    default: 
     // For all other countries not listed above: 
     $('#payment_method_3').show(); 
     break; 
    } 
}