Skip to content

Instantly share code, notes, and snippets.

@nanasess
Last active August 30, 2017 00:49
Show Gist options
  • Save nanasess/9df6b6ec4a944a485624438f2d498051 to your computer and use it in GitHub Desktop.
Save nanasess/9df6b6ec4a944a485624438f2d498051 to your computer and use it in GitHub Desktop.

PrestaShop

インストール方法 http://doc.prestashop.com/display/PS17/Getting+started

コマンドラインでもインストールできる模様 http://doc.prestashop.com/display/PS17/Installing+PrestaShop+using+the+command-line+script

Docker https://hub.docker.com/r/prestashop/prestashop/

インストール

インストーラで Notice が出る

Notice: Undefined index: in /Users/nanasess/git-repos/PrestaShop/src/PrestaShopBundle/Install/LanguageList.php on line 123
Notice: Trying to get property of non-object in /Users/nanasess/git-repos/PrestaShop/classes/Context.php on line 351
Notice: Trying to get property of non-object in /Users/nanasess/git-repos/PrestaShop/classes/Context.php on line 355
Notice: Trying to get property of non-object in /Users/nanasess/git-repos/PrestaShop/classes/Context.php on line 365
Notice: Trying to get property of non-object in /Users/nanasess/git-repos/PrestaShop/classes/Context.php on line 381

Language に日本語が無い

GD が要る PHP Accelerator を強くおすすめされる(重いらしい)

GD library is not installed
Install and enable the iconv extension.
Install and/or enable a PHP accelerator (highly recommended).

GD, iconv, opcache, apcu を有効にする

phpbrew ext install gd \-- --with-jpeg-dir=/usr/local/Cellar/jpeg/8d/lib

インストーラの途中経過表示はわかりやすい

Country で Timezone が決まる模様

  • Information about your Store で進まない. エラーも出ない

    • Notice が出ているとダメらしい
    • error_reporting(0) を入れたら進んだ
  • キャラクターがツノメドリ

  • 住所の Google Map が自動的に出てくるのは良い

  • JP standard rate(5%) になってる(古い)

  • エラーがわかりにくい

    • Unable to update settings. って出るけど、何のエラーなのかわからない
    • Symfony Debug toolbar の Exception で初めてわかる
  • Smarty3

  • Symfony DI つかってる

  • Bundle がいろいろ使えそうなので拡張性が高そう

PrestaShop’s customization is based on three possibilities:

  • Themes,
  • Modules,
  • Overriding.
  • ObjectModel class をベースにして拡張

  • DbQuery は SC_Query によく似てる.

  • オーバーライドは排他的

  • Module のオーバーライドはできない

  • Module のチュートリアルが短かくてよい

  • 基本的に継承なので, 単体テストは書きにくそう

  • ベーシック認証の CRUD の API は用意されている.

  • どんな技術を使っているか, 背景がきちんと書かれている

    • 距離の離れた開発者と作業しやすいはず

PrestaShop1.7 と Symfony について http://build.prestashop.com/news/prestashop-1-7-and-symfony/ 後方互換コード無しの Symfony2.8 ベースなので Symfony3 でも動くはず http://build.prestashop.com/news/prestashop-1-7-faq/#why-symfony-2-and-not-3

Magento2

  • インストーラの途中経過表示はわかりやすい
  • 最後までスムーズにいったと思いきや, ルーティングのパスがおかしいっぽい
php bin/magento setup:install --base-url=http://127.0.0.1:8081 \
        --db-host=127.0.0.1 --db-name=magento --db-user=root \ 
        --db-password=password --admin-firstname=Magento \
        --admin-lastname=User --admin-email=user@example.com \
        --admin-user=admin --admin-password=password \
        --language=ja_JP --currency=JPY --timezone=Asia/Tokyo --use-rewrites=0
  • bin/magento setup:uninstall があるのは良い

  • gd は,ここまで指定しないといけない

phpbrew ext install gd \-- --with-jpeg-dir=/usr/local/Cellar/jpeg/8d/lib --with-freetype-dir=/usr/local/Cellar/freetype/2.8/lib -enable-gd-native-ttf --with-gd=shared

OpenCart

  • シンプル

  • vendor 以下も github でバージョン管理されている

  • EC-CUBE に似た雰囲気. 基本機能は, ずっと充実しているが

  • イギリス人と香港人の二人でメンテナやってる?

  • シンプルなの以外に特筆すべきものが無いような...

    • EC-CUBEも然り
  • openbaypro Amazon や eBay と連携できるやつ https://www.openbaypro.com/index.php

  • PrestaShop もそうだが, インストール完了画面で 安心のサポートあるよ アピールがよい

  • インストール完了後に storage ディレクトリは外から見えないところに移動しろって出る

  • 日本の都道府県マスタも対応してる

  • 割り込んだり, 差し込んだりはせずに, テーマを編集してね. というスタンス?

  • Module Builder というのがある http://opencart.hostjars.com/creating-opencart-modules

https://giftshop.redcross.org.uk/index.php?route=checkout/cart で試してみたが, 日本宛の送料の見積りが動かなかった

  • Theme Editor に The theme editor uses the template language Twig. You can read about Twig syntax here. ってでてくるのが良い

Sylius

  • いろいろ書かなきゃいけないことが多い

  • 10年くらい前の Java っぽい. Liferay みたいな.

  • API もしっかりしている

    • どこまで準拠しているか, わからないけど OAuth2
  • 個々のカスタマイズ方法のドキュメントはある. 基本的にオーバーライド

  • Cart と Order の関係は参考になる http://docs.sylius.org/en/latest/book/orders/index.html

exif が必要

phpbrew ext install exif

master では, PHP7.1 以降でないと動かない

  • コマンドラインインストーラが大変よくできている

  • フレームワークの上に, アプリが乗ってる感じ

  • 基本的に SymfonyBundle なので, Symfony マスターならカスタマイズしやすいはずだが, 慣れるまで難しい

  • 記述量が多い

  • debug toolbar のいいところをパクりたい

    • Security, Cache など. Theme とか Email もある

other

  • それぞれ, 何でこれ使ってるの? って聞いてまわるのがよさげな感じ. 外から見ていても, よくわからない
  • Translation は, みんな標準. 日本以外の地域では, 商習慣が同じだけど言語が異なるケースが多い
  • カスタマイズの簡易さなどは EC-CUBE は負けてないと思う
    • ただし, まだ荒削り
    • Python や Rails ベースも確認しておきたい
    • しかし何故 PHP ベースが多いのか
  • 冗長化できるか?

template

  • テーマカスタマイズのしやすさ(理解しやすさ)
  • 開発者向けドキュメントの充実度
  • 開発環境の試しやすさ
  • テストのしやすさ
  • プラグインの作りやすさ
  • プラグインの競合のしにくさ
  • 大規模カスタマイズのしやすさ
  • Googleにたよれるか・どこで答えがみつかるか
  • その他気になった点・所感
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment