EC-CUBE3のメモ - 開発環境 -で
eccube_install.sh
を変更せずに叩いちゃったときに、本来変更しないといけない箇所がわからなくなっちゃったときの対処法です。
足立のVagrantを前提としてます。
eccube_install.sh
を叩くと、
app/config/eccube/config.php
app/config/eccube/config.yml
上記2つの設定ファイルが作成されます。
config.php
は、LC_Page_XXXX系が参照していて、
config.yml
は、Silexに乗せ換えたControllerが参照しています。
この中身を手動で書き換えてあげましょう。
足立のVagrantを利用していれば以下と同じになります。
config.php
<?php
define('ECCUBE_INSTALL', 'ON');
★define('HTTP_URL', 'http://192.168.33.10/ec-cube/html/');
★define('HTTPS_URL', 'http://192.168.33.10/ec-cube/html/');
★define('ROOT_URLPATH', '/ec-cube/html/');
define('DOMAIN_NAME', '');
define('DB_TYPE', 'pgsql');
define('DB_USER', 'cube3_dev_user');
define('DB_PASSWORD', 'password');
define('DB_SERVER', '127.0.0.1');
define('DB_NAME', 'cube3_dev');
define('DB_PORT', '5432');
define('ADMIN_DIR', 'admin/');
define('ADMIN_FORCE_SSL', FALSE);
define('ADMIN_ALLOW_HOSTS', 'a:0:{}');
define('AUTH_MAGIC', 'droucliuijeanamiundpnoufrouphudrastiokec');
define('PASSWORD_HASH_ALGOS', 'sha256');
define('MAIL_BACKEND', 'mail');
define('SMTP_HOST', '');
define('SMTP_PORT', '');
define('SMTP_USER', '');
define('SMTP_PASSWORD', '');
config.yml
database:
driver: pdo_pgsql
host: 127.0.0.1
dbname: cube3_dev
port: 5432
user: cube3_dev_user
password : password
charset: utf8
mail:
host: localhost
port: 25
username:
password:
encryption:
auth_mode:
auth_type: HMAC
auth_magic: droucliuijeanamiundpnoufrouphudrastiokec
password_hash_algos: sha256
use_point: true
option_favorite_product: true
mypage_order_status_disp_flag: true
★root: /ec-cube/html/
★tpl: /ec-cube/html/user_data/packages/default/
★admin_tpl: /ec-cube/html/user_data/packages/admin/
shop_name: EC-CUBE SHOP
release_year: 2015
mail_cc:
- admin@example.com
stext_len: 50
sample_address1: 市区町村名 (例:千代田区神田神保町)
sample_address2: 番地・ビル名 (例:1-3-5)
★をつけた箇所が間違えやすいので、気を付けてください。
EntryやContactにアクセスしたときに、CSSがあたってないデザインの場合は、
だいたいの場合、 tpl
の設定が間違っていることが多いです。