Skip to content

Instantly share code, notes, and snippets.

Avatar

kurozumi kurozumi

View GitHub Profile
@kurozumi
kurozumi / product_histroy.twig
Created Oct 23, 2020
商品閲覧履歴ブロック
View product_histroy.twig
{% 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>
View ProductHistoryEventSubscriber.php
<?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.
View ProductCollection.php
<?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 Oct 14, 2020
イベントで商品IDをクッキーの保存・取得を行う
View ProductSubscriber.php
<?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 Apr 21, 2020
商品IDをCookieに保存したり取得したり
View CheckedProduct.php
<?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 Feb 10, 2020
CI/CD for EC-CUBE4 PLUGIN
View main.yml
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:
View gist:9717a5dddf46650aeb9de5fafd3457a2
<?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.
*
View 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") }}",
View gist:6ba276b05b0ea2653d5692b251b5e723
<?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;
View ImageController.php
<?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;
You can’t perform that action at this time.