Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

luyenlvVNC commented Mar 23, 2021

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