![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
magento
magento 国外开源电商系统
xiakaiphp
长期从事互联网工作。
展开
-
magento2 Each method must have a doc block. See
执行如下命令出现如下报错 , 十有八九是因为接口没有写注释说明, magento2接口必须写注释php bin/magento setup:upgradeEach method must have a doc block. See Maijindou\Shipment\Api\ShipmentRepositoryInterface::getLogisticsInfo()...原创 2020-03-31 10:52:58 · 372 阅读 · 1 评论 -
magento2 rest api “The account sign-in was incorrect or your account is disabled temporarily“
magento2 rest api 出现The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.DELETE FROM oauth_token_request_log;原创 2020-03-31 10:10:22 · 1242 阅读 · 0 评论 -
magento2 自定义更改订单状态 SQL操作
更改订单表更改前请先备份,以免造成不必要的损失increment_id 替换成自己的订单号UPDATE sales_order SET STATUS='pending',state='complete' WHERE increment_id='ectw4000000914'更改订单网格表UPDATE sales_order_grid SET status='pending' WHERE...原创 2020-03-26 17:34:18 · 474 阅读 · 0 评论 -
magento2 admin login Document Element ‘resource‘: The attribute ‘title‘ is required but missing
Could not create an acl object:Invalid Document Element 'resource': The attribute 'title' is required but missing出现错误的原因是/etc/acl.xml 中的 中的title不存在若下图所示箭头没有title造成的报错总结 后台登录报错而前台正常 一般都etc报错...原创 2020-03-25 13:58:03 · 197 阅读 · 0 评论 -
magento2 Notice: Undefined offset: 2 in
1 exception(s):Exception #0 (Exception): Notice: Undefined offset: 2 in解决办法 重置后台密码 admin_userUPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username...原创 2020-03-24 16:49:28 · 273 阅读 · 0 评论 -
magento2 home page 404
必须是magento 本身设置的404界面 非nginx 404检查 url_rewrite数据表 request_path 是否有空检查最新添加的几个产品是否存在 urk_key 不存在的情况原创 2020-03-11 16:43:56 · 380 阅读 · 0 评论 -
magento2 rest API 导入到postman
一共三步通过后台账号密码 或者tokencurl -X POST "http://m2.host/index.php/rest/V1/integration/admin/token" -H "Content-Type:application/json" -d '{"username":"admin", "password":"your-password"}'通过token 获取所有A...原创 2020-02-27 14:47:24 · 331 阅读 · 0 评论 -
magento2 迁移项目
数据库导入项目导入nginx配置//宝塔配置upstream fastcgi_backend { server unix:/tmp/php-cgi-72.sock;}nginx.config root 改成 set $MAGE_ROOTinclude 后面增加 include /www/wwwroot/域名/nginx.conf.sample;更改数据库core_con...原创 2020-02-11 11:32:31 · 415 阅读 · 0 评论 -
magento2 后台config配置和读取配置
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> <system>...原创 2020-01-09 10:03:08 · 825 阅读 · 0 评论 -
magento2 语言包
导出翻译包bin/magento i18n:collect-phrases -m -o app/index.csv原创 2020-01-07 16:41:52 · 201 阅读 · 0 评论 -
magento2 常用代码
获取objectManager$objectManager = \Magento\Framework\App\ObjectManager::getInstance();DataObject是所有Model的基类$row = new \Magento\Framework\DataObject();$row->setData($key, $value);$row->getDat...转载 2019-12-27 15:24:51 · 666 阅读 · 0 评论 -
magento2 Required parameter ‘theme_dir‘ was not passed
报错原因1.直接删除主题2.导入其他数据库解决办法1.搜索数据表 theme 删除不存在的主题2.搜索数据表 core_config_data 然后搜索 path字段值为 design/theme/theme_id 数据改成对应的主题(不知道填写1)...原创 2019-12-05 11:19:38 · 525 阅读 · 0 评论 -
magento2 修改后台入口
项目目录/app/etc/env.phpfrontName的值就是后台入口地址原创 2019-11-12 13:57:18 · 1070 阅读 · 0 评论 -
magento2 requested store is not found
搜索数据表 store store_group store_website注意外键约束UPDATE store SET store_id = 0 WHERE code='admin';UPDATE store_group SET group_id = 0 WHERE name='Default';UPDATE store_website SET website_id = 0 W...原创 2019-11-12 15:50:31 · 260 阅读 · 0 评论