src/Flexy/FrontBundle/Themes/IlaveU/Controller/CartController.php line 18
<?php
namespace App\Flexy\FrontBundle\Themes\IlaveU\Controller;
use App\Flexy\ProductBundle\Repository\ProductRepository;
use App\Flexy\ShopBundle\Entity\Product\ProductShop;
use App\Flexy\ShopBundle\Repository\Customer\CustomerRepository;
use App\Flexy\ShopBundle\Repository\Shipping\CityRegionRepository;
use App\Flexy\ShopBundle\Repository\Shipping\ShippingMethodRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route('/{_locale}/shop/cart')]
class CartController extends AbstractController
{
#[Route('/', name: 'cart')]
public function cart(ShippingMethodRepository $shippingMethodRepository,CustomerRepository $customerRepository,CityRegionRepository $cityRegionRepository): Response
{
$shippingMethods = $shippingMethodRepository->findAll();
$cityRegions = $cityRegionRepository->findAll();
$customer = null;
if($this->getUser()){
$customer = $customerRepository->findOneBy(["user"=>$this->getUser()]);
}
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig',
[
"shippingMethods"=>$shippingMethods,
"customer"=>$customer,
"totalCart"=>160,
"cityRegions"=>$cityRegions
]);
}
#[Route('/wishlist', name: 'wishlist')]
public function wishlist(): Response
{
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/cart/wishlist.html.twig');
}
#[Route('/compare', name: 'compare')]
public function compare(): Response
{
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/cart/compare.html.twig');
}
#[Route('/show-devis', name: 'show_devis')]
public function show_devis(): Response
{
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/cart/showDevis.html.twig');
}
}