magento 运输选项仅限于 pincode。我想将我的 cod 选项限制为一些 pincodes.PLZ HELP
<?php
//Edit pincodes here ...
$def_pin_u = '110058,112233,114455,220034';
$v_u = Mage_Checkout_Block_Onepage_Progress::getShipping()->format();
$l_u = strlen($v_u) - 1;
for ($c_u = $l_u; $v_u[$c_u] != ','; $c_u--):
$s_u = $c_u - 1;
endfor;
$s_u = $s_u - 1;
for ($c2_u = $s_u; !is_numeric($v_u[$c2_u]); $c2_u--):
$s_u = $c2_u - 1;
endfor;
for ($c3_u = $s_u; is_numeric($v_u[$c3_u]); $c3_u--):
$s2_u = $c3_u;
endfor;
$se_u = $s_u-$s2_u + 1;
$pin_u = substr($v_u, $s2_u, $se_u);
$arr_pin_u = explode(',', $def_pin_u);
$flg_u = 0;
for ($c4_u = 0; $arr_pin_u[$c4_u]; $c4_u++):
if ($pin_u == $arr_pin_u[$c4_u]):
$flg_u = 1;
endif;
endfor;
?>
<?php if(($_code == 'cashondelivery' && $flg_u == 1) || ($_code != 'cashondelivery')): ?>
我得到的错误
Fatal error: Class 'Mage_Shipping_Model_Config' not found in /home/demo2/public_html/app/code/core/Mage/Tax/Model/Calculation.php on line 243
Fatal error: Call to a member function setStoreId() on a non-object in /home/demo2/public_html/app/code/core/Mage/Checkout/Model/Session.php on line 109