Skip to content

Instantly share code, notes, and snippets.

View izayoi256's full-sized avatar

Qwert izayoi256

View GitHub Profile
https://dl.dropboxusercontent.com/scl/fi/gya5tmzbuarbqd128y2h8/1.png?rlkey=1h2izmfkbzcq64pmvmjwd8iu8&st=3dc08vcs
aaa
bbb
@izayoi256
izayoi256 / AddCustomerEditColumnEventListener.php
Created November 9, 2020 08:34
[EC-CUBE4] イベントリスナーを責務で切り分ける
<?php
namespace Customize\EventListener;
use Eccube\Event\EccubeEvents;
use Eccube\Event\EventArgs;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
final class AddCustomerEditColumnEventListener implements EventSubscriberInterface
@izayoi256
izayoi256 / CreateSomethingAction.php
Last active November 9, 2020 07:45
[EC-CUBE4] シングルアクションコントローラー
<?php
namespace Customize\Controller;
use Customize\Entity\Something;
use Eccube\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
/**
* このクラスの責務は「Somethingを作ること」
@izayoi256
izayoi256 / DecorativeArrayCollection.php
Last active November 25, 2020 08:59
[EC-CUBE4] 既存のPurchaseFlowを維持したままProcessorを追加する
<?php
namespace Customize\Common\Collections;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
class DecorativeArrayCollection extends ArrayCollection
{
public function __construct($elements = [])
@izayoi256
izayoi256 / Customer.php
Last active October 19, 2018 07:21
EC-CUBE4 エンティティ拡張で既存メソッドを書き換える ref: https://qiita.com/izayoi256/items/cdd8074f7264b5d90f90
// 前略
public function getRoles()
{return $this->getTraitRoles();}
//後略
@izayoi256
izayoi256 / .default.env
Last active October 19, 2018 09:27
docker-composeでEC-CUBE4の開発環境構築 ref: https://qiita.com/izayoi256/items/5278b8bd78c0b3d16111
# EC-CUBEのHTTPポート番号
#ECCUBE_HTTP_PORT=
# EC-CUBEのxdebug.remote_port
#ECCUBE_XDEBUG_PORT=
# EC-CUBEの設定
#ECCUBE_APP_ENV=
#ECCUBE_APP_DEBUG=
#ECCUBE_DATABASE_URL=

Docker

You can easily setup loanorleased if you are used to Docker. Please follow the link below.

izayoi256/loanorlease

NOTE: If you are new to Docker, you should not try it.

Build on Ubuntu

のし・ラッピングオプションのサンプル

商品情報、注文情報に「のし・ラッピングオプション」を追加するサンプルです。 3.n にて追加された拡張機能を使用して実装します。 以下のカスタマイズを実施します。

  • 商品情報に「のし・ラッピング対応」フラグ追加
  • 商品詳細に「のし・ラッピング対応」オプション表示
  • のし・ラッピング種別マスタ追加(名称・追加料金)
  • 注文画面に、のし・ラッピング選択・記載内容フォーム表示
<?php
namespace Plugin\HogePlugin;
use Eccube\Application;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
class Event
{
/**
@izayoi256
izayoi256 / LC_Page_Admin_Order_ProductSelect.php
Created July 4, 2016 03:22
LC_Page_Admin_Order_ProductSelect.php
// 略
switch ($this->getMode()) {
case 'search':
$objProduct = new SC_Product_Ex();
$this->arrForm = $objFormParam->getHashArray();
$wheres = $this->createWhere($objFormParam, $objDb);
$this->tpl_linemax = $this->getLineCount($wheres, $objProduct);
//ぶった斬りポイント==================================================================
// ページ送りの処理