Skip to content

Instantly share code, notes, and snippets.

View kurozumi's full-sized avatar

kurozumi kurozumi

View GitHub Profile
@kurozumi
kurozumi / product_histroy.twig
Created October 23, 2020 04:06
商品閲覧履歴ブロック
{% if productHistory %}
<div class="ec-role">
<div class="ec-newItemRole">
<div class="ec-newItemRole__list">
<div class="ec-newItemRole__listItem">
<div class="ec-newItemRole__listItemHeading ec-secHeading--tandem">
<span class="ec-secHeading__en">HISTORY</span>
<span class="ec-secHeading__line"></span>
<span class="ec-secHeading__ja">商品閲覧履歴</span>
</div>
<?php
/**
* This file is part of ProductHistory
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
<?php
/**
* This file is part of ProductHistory
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@kurozumi
kurozumi / ProductSubscriber.php
Last active October 14, 2020 02:36
イベントで商品IDをクッキーの保存・取得を行う
<?php
namespace Customize\EventSubscriber;
use Customize\Service\CheckedProduct;
use Eccube\Common\EccubeConfig;
use Eccube\Event\TemplateEvent;
use Eccube\Repository\ProductRepository;
@kurozumi
kurozumi / CheckedProduct.php
Last active April 21, 2020 08:54
商品IDをCookieに保存したり取得したり
<?php
namespace Customize\Service;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Eccube\Entity\Product;
use Symfony\Component\HttpFoundation\Cookie;
@kurozumi
kurozumi / main.yml
Last active February 10, 2020 09:40
CI/CD for EC-CUBE4 PLUGIN
name: CI/CD for EC-CUBE4 PLUGIN
on: push
env:
PLUGIN_CODE: EmailEntry4
ECCUBE_BRANCH: '4.0'
jobs:
mysql:
name: MySQL
runs-on: ubuntu-latest
strategy:
<?php
/*
* Copyright (C) 2019 Akira Kurozumi <info@a-zumi.net>.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@kurozumi
kurozumi / image_add.js
Created February 25, 2019 14:22
image_add.js
{% block javascripts %}
<script src="//blueimp.github.io/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload.js"></script>
<script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload-process.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload-image.js"></script>
<script type="text/javascript">
$('#{{ form.image.vars.id}}').fileupload({
url: "{{ url("image_add") }}",
<?php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
@kurozumi
kurozumi / ImageController.php
Created February 25, 2019 08:43
ImageController
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\File\Exception\FileException;