Get Fix from Magento repository to my project

為{幸葍}努か 提交于 2019-12-11 15:01:32

问题


I have a question. How can I download the changes in this hotfix: https://github.com/magento/magento2/commit/1e78fe2e37af0012b7f60b29c658221b8ab8467b

Version Magento in my project is 2.1.2 and I have a problem with this exception:

Configurable product "44583" does not have sub-products

So, How can I download only this fix to my repository?


回答1:


You can use composer-patch to apply Magento fix. To use it, you can do the following steps:

  1. Install composer patch:

    composer require cweagans/composer-patches

  2. Download your patch here and edit and split that patch to something like this:

  3. Open your_magento_install_dir/composer.json and edit "extra" node to apply your patch like this:

    "extra": {
    "magento-force": "override",
    "patches": {
      "magento/module-catalog": {
        "Fix: https://github.com/magento/magento2/issues/5762": "patches/your_patch.patch"
      },
      "magento/module-configurable-product": {
        "Fix: https://github.com/magento/magento2/issues/5762": "patches/your_patch.patch"
      },
    }
    

    }

I hope this will solve your problem

Thanks



来源:https://stackoverflow.com/questions/53602875/get-fix-from-magento-repository-to-my-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!