如何从结帐页面更改"不需要"的邮政编码所需字段? 我更改了app / design / frontend / base / default / template / persistent / checkout / onepage / billing.phtml中的106-111行
<div class="field">
<label for="billing:postcode"><?php echo $this->__('Zip/Postal Code') ?></label>
<div class="input-box">
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php// echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
</div>
</div>
此外,我已从文件"app / code / core / Mage / Customer / Model / Address / Abstract.php"中删除了这些行
$_havingOptionalZip = Mage::helper('directory')->getCountriesWithOptionalZip();
if (!in_array($this->getCountryId(), $_havingOptionalZip)
&& !Zend_Validate::is($this->getPostcode(), 'NotEmpty')
) {
$this->addError(Mage::helper('customer')->__('Please enter the zip/postal code.'));
}
但它没有完全改变那个不需要的领域.因为当我下订单时,它会显示一条消息
"Zip/Postal Code" is a required value.
最新回答
- 2019-12-51 #
- 2019-12-52 #
您需要确保查看 "默认"屏幕视图,如果您正在任何其他商店视图中查看,则不会显示
相关问题
- checkout:以magento编程方式创建订单magento1.9magentocheckoutmagentoshippingmethodsmagentopaymentmethodsmagentoquote2019-12-05 21:40
- checkout:当格兰特为零时,Magento 19跳过付款方法步骤magento1.9magentocheckoutmagentoordersmagentopaymentmethodsmagentograndtotal2019-12-05 21:44
- magento 1.9:无法结帐错误在下订单之前,请同意所有条款和条件magento1.9magentocheckoutmagentotemplatemagentoprogrammingmagentotermsandconditions2019-12-05 21:42
- checkout:Magento如何在为客人下订单之前更新结算/发货订单magento1.9magentocheckoutmagentobillingmagentoeditorder2019-12-05 21:38
- magento 1.9:如何在单页结账后的结算信息步骤中将客户保存在数据库中?magento1.9magentoonepagecheckoutmagentocustomeraddressmagentobillingaddress2019-12-05 21:39
您可以在管理面板中更改它本身。
导航至
您可以选择zip / Postal Code可选的国家/地区。