gpt4 book ai didi

php - 找不到类 'Zend_Measure_Weight' - Magento

转载 作者:行者123 更新时间:2023-12-03 07:59:43 24 4
gpt4 key购买 nike

当我转到 Magento (ver 1.9) 中的发货页面时出现 fatal error .它的说法:

Fatal error: Class 'Zend_Measure_Weight' not found in /home/www/mysite.com/www/newsite/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php on line 439



我在第 439 行有此代码:
'dimensions_variables'  => array(
'L' => Zend_Measure_Weight::POUND,
'LB' => Zend_Measure_Weight::POUND,
'POUND' => Zend_Measure_Weight::POUND,
'K' => Zend_Measure_Weight::KILOGRAM,
'KG' => Zend_Measure_Weight::KILOGRAM,
'KILOGRAM' => Zend_Measure_Weight::KILOGRAM,
'I' => Zend_Measure_Length::INCH,
'IN' => Zend_Measure_Length::INCH,
'INCH' => Zend_Measure_Length::INCH,
'C' => Zend_Measure_Length::CENTIMETER,
'CM' => Zend_Measure_Length::CENTIMETER,
'CENTIMETER'=> Zend_Measure_Length::CENTIMETER,

)

我该如何解决?

最佳答案

因为你从你的模型中调用它,所以你必须在你的类之前添加它

require_once(Mage::getBaseDir('lib') . '/Zend/Measure/Weight.php');

class ........ extends Mage_Core_Model_Abstract

完成后,您可以调用 Zend_Measure_Weight现在上课。

关于php - 找不到类 'Zend_Measure_Weight' - Magento,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31074007/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com