devandclick / Ecommerce

Créer un site Ecommerce avec DevAndClick
35 stars 71 forks source link

Je n'arrive pas à afficher un produit, j'ai un message d'erreur #3

Closed Anouchka25 closed 8 years ago

Anouchka25 commented 8 years ago

Bonjour Je n'arrive pas à afficher un produit, j'ai un message d'erreur "Unable to find template "ANEcommerceBundle:Produits:index.html.twig" (looked into: C:\Program Files\EasyPHP-DevServer-14.1VC9\Ecommerce\app/Resources/views, C:\Program Files\EasyPHP-DevServer-14.1VC9\Ecommerce\vendor\symfony\symfony\src\Symfony\Bridge\Twig/Resources/views/Form). "

J'ai bien suivi votre tuto et je ne vois pas où vient l'erreur. Aidez-moi svp.

Voici mes fichiers 1- ProduitsController.php

<?php

namespace AN\EcommerceBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class ProduitsController extends Controller { public function produitsAction() { return $this->render('ANEcommerceBundle:Produits:index.html.twig'); } }

_2- Routing.yml _

an_ecommerce_homepage: path: / defaults: { _controller: ANEcommerceBundle:Produits:produits }

_3- index.html.twig _

{% extends "ANEcommerceBundle::base.html.twig" %}

{% block body %}

DevAndClick

Item Brand and Category

AB29837 Item Model

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

3.33€

{% endblock %}

4- base.html.twig

<!DOCTYPE html>

{% block title %}Welcome!{% endblock %} ``` {% block stylesheets %} {% endblock %} {% block body %}{% endblock %}

Informations

Notre entrepôt

 Paris 75 000 - 3 rue des jardins

Nous contacter

 Tel: 02 35 00 00 00

 Fax: 02 35 00 00 00

© Copyright 2014 - DevAndClick

```

{% block javascripts %}{% endblock %}

5- parameters.yml

This file is auto-generated during the composer install

parameters: database_host: localhost database_port: null database_name: bd_ecommerce database_user: root database_password: null mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: null mailer_password: null secret: ThisTokenIsNotSoSecretChangeIt twig: globals: telephone: '02 35 00 00 00' fax: '02 35 00 00 00' adresse: 'Paris 75 000 - 3 rue des jardins' pathDefault: 'http://localhost/Ecommerce/web/'`

Anouchka25 commented 8 years ago

C'est bon j'ai réussi à afficher le produit. Merci beaucoup pour ce tuto.