Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created December 11, 2020 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/a97df824f5cf18ad220a5f1384de0f3c to your computer and use it in GitHub Desktop.
Save kurozumi/a97df824f5cf18ad220a5f1384de0f3c to your computer and use it in GitHub Desktop.
ProductController
<?php
/**
* This file is part of Customize
*
* 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.
*/
namespace Customize\Controller;
use Eccube\Entity\Product;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class ProductController
* @package Customize\Controller
*/
class ProductController extends \Eccube\Controller\ProductController
{
/**
* EC-CUBE本体の商品情報ページを修正する
*
* @Route("/products/detail/{id}", name="product_detail", methods={"GET"})
* @Template("Product/detail.twig")
* @ParamConverter("Product", name="product_detail", class="Eccube\Entity\Product", options={"id" = "id"})
*
* @param Request $request
* @param Product $Product
* @return array
*/
public function detail(Request $request, Product $Product)
{
return parent::detail($request, $Product);
}
}
@luyenlvVNC
Copy link

Hi Pro,
How to work with category?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment