EC-CUBE4でプラグインをインストールしたり、有効化する方法はブラウザ上の管理画面で行う方法とコマンドラインから行う2つの方法があります。
今回はコマンドラインから行う方法を紹介します。
ブラウザ上から行うよりも、コマンドラインの方が早いので覚えておきましょう。
コマンドラインから実施する方法
プラグインファイルの移動、解凍
$ mv 移動元/プラグイン圧縮ファイル app/Plugin/プラグイン保存ディレクトリ
$ cd app/Plugin/プラグイン保存ディレクトリ
$ tar xzf プラグイン圧縮ファイル
必要に応じて、プラグイン圧縮ファイルの削除
$ rm プラグイン圧縮ファイル
プラグインのインストール
$ bin/console e:p:i --code=プラグインコード
// Clearing the cache for the dev environment with debug true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
[OK] Installed.
{
"name": "ec-cube/AgeLimit",
"version": "1.0.0",
"description": "EC-CUBE agelimit Plugin",
"type": "eccube-plugin",
"require": {
"ec-cube/plugin-installer": "~0.0.7"
},
"extra": {
"code": "AgeLimit"
}
}
プラグインの有効化
$ bin/console e:p:e --code=プラグインコード
// Clearing the cache for the dev environment with debug true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
[OK] Plugin Enabled.
プラグインの無効化
$ bin/console e:p:d --code=AgeLimit
// Clearing the cache for the dev environment with debug true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
[OK] Plugin Disabled.
以上です。
スポンサーリンク
スポンサーリンク