ProductController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Pro,
How to work with category?
EX: http://example.com/product/list?category_id=1 -> http://example.com/product/list/1 or http://example.com/product/list/category_slug