Bigcommerce:Check Out页面的一些参数获取(比如国家)
1. 获取Billing Address里面选中的国家:
$quoteAddress = getClass('ISC_CHECKOUT')->getQuote()->getBillingAddress();
$countryName = $quoteAddress->getCountryName();
2. 获取Shipping Address 里面选中的国家:
$shippingFormFields = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_SHIPPING, true);
foreach($shippingFormFields as $formField) {
$privateId = $formField->record['formfieldprivateid'];
if($privateId == 'Country') {
$countryName = $formField->getValue();
}
}