Skip to content

Instantly share code, notes, and snippets.

View izayoi256's full-sized avatar

Qwert izayoi256

View GitHub Profile
@izayoi256
izayoi256 / AdminControllerProvider.php
Last active June 1, 2016 02:55
ルーティングの変更
// system/masterdata
$c->match('/setting/system/masterdata', '\Eccube\Controller\Admin\Setting\System\MasterdataController::index')->bind('admin_setting_system_masterdata');
// 旧
// $c->match('/setting/system/masterdata/edit', '\Eccube\Controller\Admin\Setting\System\MasterdataController::edit')->bind('admin_setting_system_masterdata_edit');
// 新
$c->match('/setting/system/masterdata/{entity}/edit', '\Eccube\Controller\Admin\Setting\System\MasterdataController::index')
->bind('admin_setting_system_masterdata_edit');
@izayoi256
izayoi256 / LC_Page_Admin_Order_ProductSelect.php
Last active July 4, 2016 01:22
LC_Page_Admin_Order_ProductSelect.php
// 略
// 規格2が設定されている
$this->tpl_classcat_find2 = $objProduct->classCat2_find;
$this->tpl_product_class_id = $objProduct->product_class_id;
$this->tpl_stock_find = $objProduct->stock_find;
SC_Utils_Ex::sfPrintR($objProduct->stock_find); // 追加
break;
default:
break;
}
// /data/class/SC_Product.php
/**
* 商品IDに紐づく商品規格を自分自身に設定する.
*
* 引数の商品IDの配列に紐づく商品規格を取得し, 自分自身のフィールドに
* 設定する.
*
* @param array $arrProductId 商品ID の配列
* @param boolean $has_deleted 削除された商品規格も含む場合 true; 初期値 false
@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);
//ぶった斬りポイント==================================================================
// ページ送りの処理
<?php
namespace Plugin\HogePlugin;
use Eccube\Application;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
class Event
{
/**

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

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

  • 商品情報に「のし・ラッピング対応」フラグ追加
  • 商品詳細に「のし・ラッピング対応」オプション表示
  • のし・ラッピング種別マスタ追加(名称・追加料金)
  • 注文画面に、のし・ラッピング選択・記載内容フォーム表示

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

@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=
@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 / 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 = [])