var/cache/dev/twig/95/955d2a0e75f07dcce0d6f44ee50dc002.php line 44

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\MacroNamespace;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Sandbox\SecurityNotAllowedTestError;
  14. use Twig\Source;
  15. use Twig\Template;
  16. use Twig\TemplateWrapper;
  17. /* base.html.twig */
  18. class __TwigTemplate_9f813bc706ab02a3f57973568d357406 extends Template
  19. {
  20. private Source $source;
  21. /**
  22. * @var array<string, MacroNamespace>
  23. */
  24. private array $macros = [];
  25. private \Twig\Runtime\EscaperRuntime $escaper;
  26. public function __construct(Environment $env)
  27. {
  28. parent::__construct($env);
  29. $this->source = $this->getSourceContext();
  30. $this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
  31. $this->parent = false;
  32. $this->blocks = [
  33. 'content' => [$this, 'block_content'],
  34. ];
  35. }
  36. protected function doDisplay(array $context, array $blocks = []): iterable
  37. {
  38. $macros = $this->macros;
  39. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
  41. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
  43. // line 1
  44. yield "<!doctype html>
  45. <html lang=\"fr\">
  46. <head>
  47. <meta charset=\"utf-8\">
  48. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
  49. <meta name=\"description\" content=\"Site de vente en ligne en Symfony 5\">
  50. <meta name=\"author\" content=\"Cassano Gabriele\">
  51. <title>GC Belgian Shop</title>
  52. <link href=\"";
  53. // line 11
  54. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/bootstrap.min.css"), "html", null, true);
  55. yield "\" rel=\"stylesheet\">
  56. <link href=\"";
  57. // line 12
  58. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/boutiquebelge.css"), "html", null, true);
  59. yield "\" rel=\"stylesheet\">
  60. <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css\">
  61. <link href=\"";
  62. // line 14
  63. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/carousel.css"), "html", null, true);
  64. yield "\" rel=\"stylesheet\">
  65. \t\t<style>
  66. .sf-toolbar {
  67. display: none !important;
  68. }
  69. \t\t</style>
  70. </head>
  71. <body>
  72. <header>
  73. <nav class=\"navbar navbar-expand-md navbar-dark fixed-top bg-info\">
  74. <a class=\"navbar-brand\" href=\"";
  75. // line 25
  76. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("home");
  77. yield "\">GC Belgian Shop</a>
  78. <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarCollapse\" aria-controls=\"navbarCollapse\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  79. <span class=\"navbar-toggler-icon\"></span>
  80. </button>
  81. <div class=\"collapse navbar-collapse\" id=\"navbarCollapse\">
  82. <ul class=\"navbar-nav mr-auto\">
  83. <li class=\"nav-item active\">
  84. <a class=\"nav-link\" href=\"";
  85. // line 34
  86. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("about");
  87. yield "\">Qui sommes-nous ?</a>
  88. </li>
  89. <li class=\"nav-item active\">
  90. <a class=\"nav-link\" href=\"";
  91. // line 37
  92. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("products");
  93. yield "\">Nos produits</a>
  94. </li>
  95. </ul>
  96. <div class=\"navbar-item-custom\">
  97. ";
  98. // line 42
  99. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 42, $this->source); })()), "user", [], "any", false, false, false, 42)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  100. // line 43
  101. yield " <a href=\"";
  102. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("account");
  103. yield "\">Mon compte <small>(";
  104. yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 43, $this->source); })()), "user", [], "any", false, false, false, 43), "firstname", [], "any", false, false, false, 43), "html", null, true);
  105. yield ")</small></a> | <a href=\"";
  106. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  107. yield "\"> Déconnecter</a>
  108. ";
  109. } else {
  110. // line 45
  111. yield " <a href=\"";
  112. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  113. yield "\">Connexion </a> | <a href=\"";
  114. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register");
  115. yield "\"> Inscription</a>
  116. ";
  117. }
  118. // line 47
  119. yield " </div>
  120. <a href=\"";
  121. // line 49
  122. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart");
  123. yield "\"><i class=\"fas fa-shopping-cart text-light ml-2\"></i></a>
  124. <span class=\"text-white ml-2\">(";
  125. // line 50
  126. yield (string) $this->escaper->escape($this->extensions['App\Twig\CartExtension']->getCartItemCount(), "html", null, true);
  127. yield ")</span>
  128. ";
  129. // line 52
  130. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 52, $this->source); })()), "user", [], "any", false, false, false, 52)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  131. // line 53
  132. yield " <a href=\"";
  133. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("wishlists");
  134. yield "\"><i class=\"fas fa-heart text-light ml-2\"></i></a>
  135. <span class=\"text-white ml-2\" id=\"wishlist-count\">(";
  136. // line 54
  137. yield (string) $this->escaper->escape($this->extensions['App\Twig\CartExtension']->getWishlistItemCount(), "html", null, true);
  138. yield ")</span>
  139. ";
  140. }
  141. // line 56
  142. yield " </div>
  143. </div>
  144. </nav>
  145. </header>
  146. <main role=\"main\">
  147. ";
  148. // line 62
  149. if ( $this->unwrap()->hasBlock("carousel", $context, $blocks)) {
  150. // line 63
  151. yield " <div id=\"myCarousel\" class=\"carousel slide custom-carousel\" data-ride=\"carousel\">
  152. <ol class=\"carousel-indicators\">
  153. <li data-target=\"#myCarousel\" data-slide-to=\"0\" class=\"active\"></li>
  154. <li data-target=\"#myCarousel\" data-slide-to=\"1\"></li>
  155. <li data-target=\"#myCarousel\" data-slide-to=\"2\"></li>
  156. </ol>
  157. <div class=\"carousel-inner\">
  158. <div class=\"carousel-item active\">
  159. <img src=\"";
  160. // line 72
  161. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/slider/slider1.jpg"), "html", null, true);
  162. yield "\" alt=\"Image 1 du slider\" />
  163. <div class=\"container\">
  164. <div class=\"carousel-caption text-left\">
  165. <h1>Achetez des produits belges</h1>
  166. <p>Un large choix de bières belges.</p>
  167. <p><a class=\"btn btn-lg btn-primary\" href=\"";
  168. // line 78
  169. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register");
  170. yield "\" role=\"button\">S\x27inscrire aujourd\x27hui</a></p>
  171. </div>
  172. </div>
  173. </div>
  174. <div class=\"carousel-item\">
  175. <img src=\"";
  176. // line 84
  177. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/slider/slider2.jpg"), "html", null, true);
  178. yield "\" alt=\"Image 2 du slider\" />
  179. <div class=\"container\">
  180. <div class=\"carousel-caption\">
  181. <h1>Dégustez le café belge</h1>
  182. <p>Découvrez les cafés fabriqués dans notre pays.</p>
  183. <p><a class=\"btn btn-lg btn-primary\" href=\"#\" role=\"button\">Lire plus</a></p>
  184. </div>
  185. </div>
  186. </div>
  187. <div class=\"carousel-item\">
  188. <img src=\"";
  189. // line 96
  190. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/slider/slider3.jpg"), "html", null, true);
  191. yield "\" alt=\"Image 3 du slider\" />
  192. <div class=\"container\">
  193. <div class=\"carousel-caption text-right\">
  194. <h1>Le chocolat belge</h1>
  195. <p>Comme vous le savez, les belges sont spécialistes de la bière, le chocolat et les frites.</p>
  196. <p><a class=\"btn btn-lg btn-primary\" href=\"#\" role=\"button\">Voir la gallerie</a></p>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. <a class=\"carousel-control-prev\" href=\"#myCarousel\" role=\"button\" data-slide=\"prev\">
  202. <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  203. <span class=\"sr-only\">Previous</span>
  204. </a>
  205. <a class=\"carousel-control-next\" href=\"#myCarousel\" role=\"button\" data-slide=\"next\">
  206. <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  207. <span class=\"sr-only\">Next</span>
  208. </a>
  209. </div>
  210. ";
  211. }
  212. // line 117
  213. yield "
  214. <div class=\"container marketing ";
  215. // line 119
  216. if ( ! $this->unwrap()->hasBlock("carousel", $context, $blocks)) {
  217. yield " mt-5 ";
  218. }
  219. yield "\">
  220. ";
  221. // line 120
  222. yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
  223. // line 122
  224. yield " </div>
  225. <footer class=\"footer-custom bg-info\">
  226. <p class=\"h5 mb-5 mt-3\">
  227. &copy; 2023 - <a href=\"https://gabriel-cassano.be\" style=\"color:white;\">Gabriele Cassano</a> - Tous droits réservés
  228. <br><br>
  229. <small class=\"h5\">
  230. <a href=\"";
  231. // line 131
  232. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cg");
  233. yield "\" class=\"text-white\">Conditions générales</a>
  234. &middot; <a href=\"";
  235. // line 132
  236. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cgv");
  237. yield "\" class=\"text-white\">Conditions générales de ventes</a>
  238. &middot; <a href=\"";
  239. // line 133
  240. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ml");
  241. yield "\" class=\"text-white\">Mentions légales</a>
  242. &middot; <a href=\"";
  243. // line 134
  244. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("confidentialite");
  245. yield "\" class=\"text-white\">Politique de confidentialité</a>
  246. </small>
  247. </p>
  248. </footer>
  249. </main>
  250. <script src=\"https://code.jquery.com/jquery-3.5.1.slim.min.js\"></script>
  251. <script src=\"";
  252. // line 141
  253. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/bootstrap.bundle.js"), "html", null, true);
  254. yield "\"></script>
  255. <script src=\"https://js.stripe.com/v3/\"></script>
  256. <script>
  257. var stripe = Stripe(\x27pk_test_51MmMexI1PfFa9viOYqTeiLsEwHggcXbngjC2pMdIQeGIoEpFKXLrQJdfJQKOOUloRbbj1dJZyJ9jKXymdpCKvWwW00kx87PAdl\x27);
  258. var checkoutButton = document.getElementById(\x27checkout-button\x27);
  259. checkoutButton.addEventListener(\x27click\x27, function() {
  260. ";
  261. // line 150
  262. if (array_key_exists("reference", $context)) {
  263. // line 151
  264. yield " // Créer une session de paiement avec Stripe
  265. fetch(\x27create-checkout-session/";
  266. // line 152
  267. yield (string) $this->escaper->escape((isset($context["reference"]) || array_key_exists("reference", $context) ? $context["reference"] : (function () { throw new RuntimeError('Variable "reference" does not exist.', 152, $this->source); })()), "html", null, true);
  268. yield "\x27) // remplacez cette URL par l\x27URL de votre route Symfony qui crée une session de paiement avec Stripe
  269. .then(function(response) {
  270. return response.json();
  271. })
  272. .then(function(session) {
  273. if(session.error == \"order\"){
  274. // redirection (la commande n\x27a pas été créée correctement)
  275. window.location.replace(\x27";
  276. // line 159
  277. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("order");
  278. yield "\x27)
  279. } else{
  280. // Rediriger l\x27utilisateur vers la page de paiement de Stripe
  281. return stripe.redirectToCheckout({ sessionId: session.id });
  282. }
  283. })
  284. .then(function(result) {
  285. // Afficher un message d\x27erreur si la redirection échoue
  286. if (result.error) {
  287. alert(result.error.message);
  288. }
  289. });
  290. ";
  291. } else {
  292. // line 172
  293. yield " alert(\x27La référence n\\\x27est pas définie.\x27);
  294. ";
  295. }
  296. // line 174
  297. yield " });
  298. </script>
  299. </body>
  300. </html>";
  301. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  302. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  303. return; yield;
  304. }
  305. // line 120
  306. /**
  307. * @return iterable<null|scalar|\Stringable>
  308. */
  309. public function block_content(array $context, array $blocks = []): iterable
  310. {
  311. $macros = $this->macros;
  312. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  313. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  314. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  315. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  316. // line 121
  317. yield " ";
  318. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  319. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  320. return; yield;
  321. }
  322. /**
  323. * @codeCoverageIgnore
  324. */
  325. public function getTemplateName(): string
  326. {
  327. return "base.html.twig";
  328. }
  329. /**
  330. * @codeCoverageIgnore
  331. */
  332. public function isTraitable(): bool
  333. {
  334. return false;
  335. }
  336. /**
  337. * @codeCoverageIgnore
  338. */
  339. public function getDefaultEscapeStrategy(): string|false
  340. {
  341. return "html";
  342. }
  343. /**
  344. * @codeCoverageIgnore
  345. */
  346. public function getDebugInfo(): array
  347. {
  348. return array ( 358 => 121, 345 => 120, 330 => 174, 326 => 172, 310 => 159, 300 => 152, 297 => 151, 295 => 150, 283 => 141, 273 => 134, 269 => 133, 265 => 132, 261 => 131, 250 => 122, 248 => 120, 242 => 119, 238 => 117, 214 => 96, 199 => 84, 190 => 78, 181 => 72, 170 => 63, 168 => 62, 160 => 56, 155 => 54, 150 => 53, 148 => 52, 143 => 50, 139 => 49, 135 => 47, 127 => 45, 117 => 43, 115 => 42, 107 => 37, 101 => 34, 89 => 25, 75 => 14, 70 => 12, 66 => 11, 54 => 1,);
  349. }
  350. public function getSourceContext(): Source
  351. {
  352. return new Source("<!doctype html>
  353. <html lang=\"fr\">
  354. <head>
  355. <meta charset=\"utf-8\">
  356. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
  357. <meta name=\"description\" content=\"Site de vente en ligne en Symfony 5\">
  358. <meta name=\"author\" content=\"Cassano Gabriele\">
  359. <title>GC Belgian Shop</title>
  360. <link href=\"{{ asset(\x27assets/css/bootstrap.min.css\x27) }}\" rel=\"stylesheet\">
  361. <link href=\"{{ asset(\x27assets/css/boutiquebelge.css\x27) }}\" rel=\"stylesheet\">
  362. <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css\">
  363. <link href=\"{{ asset(\x27assets/css/carousel.css\x27) }}\" rel=\"stylesheet\">
  364. \t\t<style>
  365. .sf-toolbar {
  366. display: none !important;
  367. }
  368. \t\t</style>
  369. </head>
  370. <body>
  371. <header>
  372. <nav class=\"navbar navbar-expand-md navbar-dark fixed-top bg-info\">
  373. <a class=\"navbar-brand\" href=\"{{ path(\x27home\x27) }}\">GC Belgian Shop</a>
  374. <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarCollapse\" aria-controls=\"navbarCollapse\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">
  375. <span class=\"navbar-toggler-icon\"></span>
  376. </button>
  377. <div class=\"collapse navbar-collapse\" id=\"navbarCollapse\">
  378. <ul class=\"navbar-nav mr-auto\">
  379. <li class=\"nav-item active\">
  380. <a class=\"nav-link\" href=\"{{path(\x27about\x27)}}\">Qui sommes-nous ?</a>
  381. </li>
  382. <li class=\"nav-item active\">
  383. <a class=\"nav-link\" href=\"{{path(\x27products\x27)}}\">Nos produits</a>
  384. </li>
  385. </ul>
  386. <div class=\"navbar-item-custom\">
  387. {% if app.user %}
  388. <a href=\"{{ path(\x27account\x27)}}\">Mon compte <small>({{ app.user.firstname }})</small></a> | <a href=\"{{ path(\x27app_logout\x27)}}\"> Déconnecter</a>
  389. {% else %}
  390. <a href=\"{{ path(\x27app_login\x27)}}\">Connexion </a> | <a href=\"{{ path(\x27register\x27)}}\"> Inscription</a>
  391. {% endif %}
  392. </div>
  393. <a href=\"{{ path(\x27cart\x27)}}\"><i class=\"fas fa-shopping-cart text-light ml-2\"></i></a>
  394. <span class=\"text-white ml-2\">({{ cartItemCount() }})</span>
  395. {% if app.user %}
  396. <a href=\"{{ path(\x27wishlists\x27)}}\"><i class=\"fas fa-heart text-light ml-2\"></i></a>
  397. <span class=\"text-white ml-2\" id=\"wishlist-count\">({{ wishlistItemCount() }})</span>
  398. {% endif %}
  399. </div>
  400. </div>
  401. </nav>
  402. </header>
  403. <main role=\"main\">
  404. {% if block(\x27carousel\x27) is defined %}
  405. <div id=\"myCarousel\" class=\"carousel slide custom-carousel\" data-ride=\"carousel\">
  406. <ol class=\"carousel-indicators\">
  407. <li data-target=\"#myCarousel\" data-slide-to=\"0\" class=\"active\"></li>
  408. <li data-target=\"#myCarousel\" data-slide-to=\"1\"></li>
  409. <li data-target=\"#myCarousel\" data-slide-to=\"2\"></li>
  410. </ol>
  411. <div class=\"carousel-inner\">
  412. <div class=\"carousel-item active\">
  413. <img src=\"{{ asset(\x27assets/img/slider/slider1.jpg\x27) }}\" alt=\"Image 1 du slider\" />
  414. <div class=\"container\">
  415. <div class=\"carousel-caption text-left\">
  416. <h1>Achetez des produits belges</h1>
  417. <p>Un large choix de bières belges.</p>
  418. <p><a class=\"btn btn-lg btn-primary\" href=\"{{ path(\x27register\x27)}}\" role=\"button\">S\x27inscrire aujourd\x27hui</a></p>
  419. </div>
  420. </div>
  421. </div>
  422. <div class=\"carousel-item\">
  423. <img src=\"{{ asset(\x27assets/img/slider/slider2.jpg\x27) }}\" alt=\"Image 2 du slider\" />
  424. <div class=\"container\">
  425. <div class=\"carousel-caption\">
  426. <h1>Dégustez le café belge</h1>
  427. <p>Découvrez les cafés fabriqués dans notre pays.</p>
  428. <p><a class=\"btn btn-lg btn-primary\" href=\"#\" role=\"button\">Lire plus</a></p>
  429. </div>
  430. </div>
  431. </div>
  432. <div class=\"carousel-item\">
  433. <img src=\"{{ asset(\x27assets/img/slider/slider3.jpg\x27) }}\" alt=\"Image 3 du slider\" />
  434. <div class=\"container\">
  435. <div class=\"carousel-caption text-right\">
  436. <h1>Le chocolat belge</h1>
  437. <p>Comme vous le savez, les belges sont spécialistes de la bière, le chocolat et les frites.</p>
  438. <p><a class=\"btn btn-lg btn-primary\" href=\"#\" role=\"button\">Voir la gallerie</a></p>
  439. </div>
  440. </div>
  441. </div>
  442. </div>
  443. <a class=\"carousel-control-prev\" href=\"#myCarousel\" role=\"button\" data-slide=\"prev\">
  444. <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  445. <span class=\"sr-only\">Previous</span>
  446. </a>
  447. <a class=\"carousel-control-next\" href=\"#myCarousel\" role=\"button\" data-slide=\"next\">
  448. <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  449. <span class=\"sr-only\">Next</span>
  450. </a>
  451. </div>
  452. {% endif %}
  453. <div class=\"container marketing {% if block(\x27carousel\x27) is not defined %} mt-5 {% endif %}\">
  454. {% block content %}
  455. {% endblock %}
  456. </div>
  457. <footer class=\"footer-custom bg-info\">
  458. <p class=\"h5 mb-5 mt-3\">
  459. &copy; 2023 - <a href=\"https://gabriel-cassano.be\" style=\"color:white;\">Gabriele Cassano</a> - Tous droits réservés
  460. <br><br>
  461. <small class=\"h5\">
  462. <a href=\"{{ path(\x27cg\x27)}}\" class=\"text-white\">Conditions générales</a>
  463. &middot; <a href=\"{{ path(\x27cgv\x27)}}\" class=\"text-white\">Conditions générales de ventes</a>
  464. &middot; <a href=\"{{ path(\x27ml\x27)}}\" class=\"text-white\">Mentions légales</a>
  465. &middot; <a href=\"{{ path(\x27confidentialite\x27)}}\" class=\"text-white\">Politique de confidentialité</a>
  466. </small>
  467. </p>
  468. </footer>
  469. </main>
  470. <script src=\"https://code.jquery.com/jquery-3.5.1.slim.min.js\"></script>
  471. <script src=\"{{ asset(\x27assets/js/bootstrap.bundle.js\x27) }}\"></script>
  472. <script src=\"https://js.stripe.com/v3/\"></script>
  473. <script>
  474. var stripe = Stripe(\x27pk_test_51MmMexI1PfFa9viOYqTeiLsEwHggcXbngjC2pMdIQeGIoEpFKXLrQJdfJQKOOUloRbbj1dJZyJ9jKXymdpCKvWwW00kx87PAdl\x27);
  475. var checkoutButton = document.getElementById(\x27checkout-button\x27);
  476. checkoutButton.addEventListener(\x27click\x27, function() {
  477. {% if reference is defined %}
  478. // Créer une session de paiement avec Stripe
  479. fetch(\x27create-checkout-session/{{ reference }}\x27) // remplacez cette URL par l\x27URL de votre route Symfony qui crée une session de paiement avec Stripe
  480. .then(function(response) {
  481. return response.json();
  482. })
  483. .then(function(session) {
  484. if(session.error == \"order\"){
  485. // redirection (la commande n\x27a pas été créée correctement)
  486. window.location.replace(\x27{{ path(\x27order\x27) }}\x27)
  487. } else{
  488. // Rediriger l\x27utilisateur vers la page de paiement de Stripe
  489. return stripe.redirectToCheckout({ sessionId: session.id });
  490. }
  491. })
  492. .then(function(result) {
  493. // Afficher un message d\x27erreur si la redirection échoue
  494. if (result.error) {
  495. alert(result.error.message);
  496. }
  497. });
  498. {% else %}
  499. alert(\x27La référence n\\\x27est pas définie.\x27);
  500. {% endif %}
  501. });
  502. </script>
  503. </body>
  504. </html>", "base.html.twig", "/home/gabriel-cassano-boutiquebelge/htdocs/boutiquebelge.gabriel-cassano.be/templates/base.html.twig");
  505. }
  506. }