首页 > 解决方案 > Magento 2 - 单击结帐按钮时“类不存在”

问题描述

客户无法到达结帐页面,因为出现错误消息“类不存在”

所以我检查了错误日志。日志显示以下消息。我不知道该怎么办。

这是magento 2.2.2。

请让我知道如何解决

{"0":"类不存在","1":"#0 /home/mg222/public_html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('' )\n#1 /home/mg222/public_html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('')\n#2 / home/mg222/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('')\n#3 /home/mg222/ public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('', Array)\n#4 /home/mg222/public_html/generated/代码/Magento/Customer/Model/AddressFactory.php(57):Magento\Framework\ObjectManager\ObjectManager->create(NULL, Array)\n#5 /home/mg222/public_html/vendor/magento/module-customer/Model/AddressRegistry.php(46): Magento\Customer\Model\AddressFactory ->create()\n#6 /home/mg222/public_html/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(166): Magento\Customer\Model\AddressRegistry->retrieve('100389') \n#7 /home/mg222/public_html/vendor/magento/module-quote/Model/Quote.php(936): Magento\Customer\Model\ResourceModel\AddressRepository->getById('100389')\n#8 / home/mg222/public_html/vendor/magento/module-quote/Model/Quote.php(913): Magento\Quote\Model\Quote->assignCustomerWithAddressChange(Object(Magento\Customer\Model\Data\Customer))\n# 9 /home/mg222/public_html/vendor/magento/module-checkout/Model/Type/Onepage.php(339): Magento\Quote\Model\Quote->assignCustomer(对象(Magento\Customer\Model\Data\Customer))\n#10 /home/mg222/public_html/generated/code/Magento/Checkout/Model/Type/Onepage/Interceptor.php(76): Magento\Checkout \Model\Type\Onepage->initCheckout()\n#11 /home/mg222/public_html/vendor/magento/module-checkout/Controller/Index/Index.php(37): Magento\Checkout\Model\Type\Onepage \Interceptor->initCheckout()\n#12 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(60): Magento\Checkout\Controller\Index\Index->​​execute()\n# 13 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(174): Magento\Checkout\Controller\Index\Index\Interceptor->___callParent('execute', Array)\n#14 /home /mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(189): Magento\Checkout\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}()\n#15 /home/mg222/public_html/generated/code/Magento/Checkout/Controller/Index/Index/Interceptor.php(26): Magento\Checkout\Controller\Index \Index\Interceptor->___callPlugins('execute', Array, Array)\n#16 /home/mg222/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Checkout\Controller\ Index\Index\Interceptor->execute()\n#17 /home/mg222/public_html/vendor/magento/module-checkout/Controller/Onepage.php(161): Magento\Framework\App\Action\Action->dispatch (对象(Magento\Framework\App\Request\Http))\n#18 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(60): Magento\Checkout\Controller\Onepage->dispatch (对象(Magento\Framework\App\Request\Http))\n#19 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(174):Magento\Checkout\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)\n#20 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(189): Magento\Checkout \Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#21 /home/mg222/public_html/generated/code/Magento/ Checkout/Controller/Index/Index/Interceptor.php(39): Magento\Checkout\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)\n#22 /home/mg222/public_html/vendor /magento/framework/App/FrontController.php(55): Magento\Checkout\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#23 /home/mg222 /public_html/vendor/magento/framework/Interception/Interceptor.php(60): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))\n#24 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(174): Magento\Framework\App\FrontController\Interceptor ->___callParent('dispatch', Array)\n#25 /home/mg222/public_html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\拦截器->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#26 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(171 ): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure),对象(Magento\Framework\App\Request\Http))\n#27 /home/mg222/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework \App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#28 /home/mg222/public_html/app/code/TemplateMonster/SiteMaintenance/ Model/PageCache/App/FrontController/BuiltinPlugin.php(30): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(闭包), Object( Magento\Framework\App\Request\Http))\n#29 /home/mg222/public_html/vendor/magento/framework/Interception/Interceptor.php(171): TemplateMonster\SiteMaintenance\Model\PageCache\App\FrontController\BuiltinPlugin ->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))\n#30 /home/mg222/public_html/vendor/magento/framework/ Interception/Interceptor.php(189): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#31 /home/ mg222/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(29): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)\n#32 /home /mg222/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#33 /home/mg222/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24):Magento\Framework\App\Http->launch()\n#34 /home/mg222/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch ()\n#35 /home/mg222/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#36 {main }","url":"/checkout/","script_name":"/index.php"}

标签: phpclassframeworksmagento2checkout

解决方案


您好,请运行以下命令并重试

php bin/magento 设置:升级

php bin/magento setup:di:compile

php bin/magento 设置:静态内容:部署 -f

chmod -R 777 var/ 生成/


推荐阅读