opencart2.0.1.1
设置:-重量Class=磅,Geo Zone=所有区域,尺寸(L )=10x10x10,Zip Code=33446
产品:-重量级=磅,尺寸(L )=10x10x10,重量=4。
它在国内服务部门运作正常,但国际服务公司在我使用其他国家结账时没有显示出来(墨西哥),
发布于 2015-03-24 12:09:02
我只是发现$this->config->get('usps_girth')没有返回任何值,
因此,我用公式求出周长=L+W*2+H*2;
在\catalog\model\shipping\usps.php中,我已经更改了第300行。
来自usps.php
$xml .= ' <Container>' . $this->config->get('usps_container') . '</Container>';
$xml .= ' <Size>' . $this->config->get('usps_size') . '</Size>';
$xml .= ' <Width>' . $this->config->get('usps_width') . '</Width>';
$xml .= ' <Length>' . $this->config->get('usps_length') . '</Length>';
$xml .= ' <Height>' . $this->config->get('usps_height') . '</Height>';
$xml .= ' <Girth>' . $this->config->get('usps_girth') . '</Girth>';
$xml .= ' <CommercialFlag>N</CommercialFlag>';
$xml .= ' </Package>';
$xml .= '</IntlRateV2Request>';
$request = 'API=IntlRateV2&XML=' . urlencode($xml);转到usps.php
//$this->config->get('usps_girth') -> to -> girth = L + W * 2 + H * 2
$girth =($this->config->get('usps_width'))+(($this->config->get('usps_length'))*2)+(($this->config->get('usps_height'))*2);
$xml .= ' <Container>' . $this->config->get('usps_container') . '</Container>';
$xml .= ' <Size>' . $this->config->get('usps_size') . '</Size>';
$xml .= ' <Width>' . $this->config->get('usps_width') . '</Width>';
$xml .= ' <Length>' . $this->config->get('usps_length') . '</Length>';
$xml .= ' <Height>' . $this->config->get('usps_height') . '</Height>';
$xml .= ' <Girth>' . $girth . '</Girth>';
$xml .= ' <CommercialFlag>N</CommercialFlag>';
$xml .= ' </Package>';
$xml .= '</IntlRateV2Request>';
$request = 'API=IntlRateV2&XML=' . urlencode($xml);https://stackoverflow.com/questions/29229240
复制相似问题