货到付款方式应仅对magento中的某些邮政编码/pin码可见
我们在magento 1.9.0版本中使用“货到付款”付款方式 我们只支持将货到付款送到一些邮政编码/pin码位置 意味着我们只接受来自某些邮政编码[意味着地点]的现金 在“发货地址”的“结帐”下,客户将键入其“邮政编码” 使用邮政编码,我们必须进行验证 意味着如果我们将产品交付至该邮政编码,则“付款方式”下应可见“COD”付款方式 否则,“COD”不应可见 如果有人对上述问题不清楚,请参考以下链接: 这就是问题所在 有人能详细解释一下上述解决方案吗 或 另请点击以下链接:货到付款方式应仅对magento中的某些邮政编码/pin码可见,magento,payment,Magento,Payment,我们在magento 1.9.0版本中使用“货到付款”付款方式 我们只支持将货到付款送到一些邮政编码/pin码位置 意味着我们只接受来自某些邮政编码[意味着地点]的现金 在“发货地址”的“结帐”下,客户将键入其“邮政编码” 使用邮政编码,我们必须进行验证 意味着如果我们将产品交付至该邮政编码,则“付款方式”下应可见“COD”付款方式 否则,“COD”不应可见 如果有人对上述问题不清楚,请参考以下链接: 这就是问题所在 有人能详细解释一下上述解决方案吗 或 另请点击以下链接: 有一个选项可以输
有一个选项可以输入受限制的邮政编码列表。但是我们需要一个允许的邮政编码列表解决方案。您只需编辑文件
/app/code/core/Mage/Payment/Model/Method
/Cashondelivery.php即可
在这里你会得到一个答案:
public function isAvailable($quote = null)
{
if ($quote) {
// Here is the list of restricted Zip Codes
$restrictedZips = array(
'85001',
'87965'
);
$address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
$customerZip = $address->getPostcode();
if (in_array($customerZip, $restrictedZips)) {
return false;
}
}
return parent::isAvailable($quote);
}
您只需编辑文件
/app/code/core/Mage/Payment/Model/Method
/Cashondelivery.php
在这里你会得到一个答案:
public function isAvailable($quote = null)
{
if ($quote) {
// Here is the list of restricted Zip Codes
$restrictedZips = array(
'85001',
'87965'
);
$address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
$customerZip = $address->getPostcode();
if (in_array($customerZip, $restrictedZips)) {
return false;
}
}
return parent::isAvailable($quote);
}
您只需编辑文件
/app/code/core/Mage/Payment/Model/Method
/Cashondelivery.php
在这里你会得到一个答案:
public function isAvailable($quote = null)
{
if ($quote) {
// Here is the list of restricted Zip Codes
$restrictedZips = array(
'85001',
'87965'
);
$address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
$customerZip = $address->getPostcode();
if (in_array($customerZip, $restrictedZips)) {
return false;
}
}
return parent::isAvailable($quote);
}
您只需编辑文件
/app/code/core/Mage/Payment/Model/Method
/Cashondelivery.php
在这里你会得到一个答案:
public function isAvailable($quote = null)
{
if ($quote) {
// Here is the list of restricted Zip Codes
$restrictedZips = array(
'85001',
'87965'
);
$address = $quote->isVirtual() ? $quote->getBillingAddress() : $quote->getShippingAddress();
$customerZip = $address->getPostcode();
if (in_array($customerZip, $restrictedZips)) {
return false;
}
}
return parent::isAvailable($quote);
}
这里是基于zipcode的现金交付限制的免费扩展
这里是基于zipcode的现金交付限制的免费扩展
这里是基于zipcode的现金交付限制的免费扩展
这里是基于zipcode的现金交付限制的免费扩展