<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Shop/product_teaser.html.twig */
class __TwigTemplate_3618da456f6aac5395c846a54fe03c7b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/product_teaser.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/product_teaser.html.twig"));
// line 1
$context["productImg"] = twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 1, $this->source); })()), "getFirstImageAsset", [], "any", false, false, true, 1);
// line 2
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 2, $this->source); })())) {
// line 3
echo " ";
$context["linkDetail"] = $this->extensions['App\Twig\Extension\ProductExtension']->generateLink($this->sandbox->ensureToStringAllowed((isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 3, $this->source); })()), 3, $this->source), ["document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 3, $this->source); })()), "prefix" => (isset($context["prefix"]) || array_key_exists("prefix", $context) ? $context["prefix"] : (function () { throw new RuntimeError('Variable "prefix" does not exist.', 3, $this->source); })())], []);
}
// line 5
$context["defaultPrice"] = $this->extensions['App\Twig\Extension\ProductExtension']->getDefaultPrice($this->sandbox->ensureToStringAllowed((isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 5, $this->source); })()), 5, $this->source));
// line 7
echo "<style>
.card-img-top {
position: absolute;
top: -50px;
left: 50%;
margin-left: -50px;
width: 100px !important;
height: 100px;
transition: transform 0.3s ease;
}
.card:hover .card-img-top {
transform: scale(1.2);
}
.card {
font-family: \"Roboto\";
text-transform: lowercase;
margin-top: 30px;
padding-top: 30px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
height: 170px;
}
.card a {
color: inherit;
}
.card-title {
display: block;
font-weight: 600;
}
.card-title:first-letter {
text-transform: uppercase;
}
.card:hover .card-title {
color: #106eea;
}
@media (max-width: 991px) {
.col-md-3,
.col-6 {
flex: 0 0 50%;
max-width: 50%;
}
.card {
height: 250px;
padding-top: 10px;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.col-md-3,
.col-6 {
width: 100%;
flex: 0 0 50%;
max-width: 50%;
}
.card {
height: 250px;
width: 200px;
padding-top: 10px;
margin: 10px 100px 10px 90px;
}
}
@media (min-width: 991px) {
.card {
height: 250px;
}
}
</style>
<div class=\"col-6 col-sm-6 col-md-3 mt-5\">
<div class=\"card\">
<a href=\"";
// line 86
(((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 86, $this->source); })())) ? (print ("#")) : (print (twig_escape_filter($this->env, (isset($context["linkDetail"]) || array_key_exists("linkDetail", $context) ? $context["linkDetail"] : (function () { throw new RuntimeError('Variable "linkDetail" does not exist.', 86, $this->source); })()), "html", null, true))));
echo "\" class=\"px-3\">
<img class=\"card-img-top\" src=\"";
// line 87
(((isset($context["productImg"]) || array_key_exists("productImg", $context) ? $context["productImg"] : (function () { throw new RuntimeError('Variable "productImg" does not exist.', 87, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["productImg"]) || array_key_exists("productImg", $context) ? $context["productImg"] : (function () { throw new RuntimeError('Variable "productImg" does not exist.', 87, $this->source); })()), "thumbnail", ["ProductImages"], "method", false, false, true, 87), "html", null, true))) : (print ("")));
echo "\" alt=\"Card image cap\">
<div class=\"card-block text-center mt-5\">
<span class=\"card-title fs-6\">";
// line 89
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 89, $this->source); })()), "getName", [], "method", false, false, true, 89), 89, $this->source), "html", null, true);
echo "</span>
";
// line 94
echo " </div>
</a>
</div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/product_teaser.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 149 => 94, 145 => 89, 140 => 87, 136 => 86, 55 => 7, 53 => 5, 49 => 3, 47 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% set productImg = product.getFirstImageAsset %}
{% if not editmode %}
{% set linkDetail = app_product_generate_link(product, { 'document' : document, 'prefix': prefix } , {}) %}
{% endif %}
{% set defaultPrice = app_product_default_price(product) %}
{#{% set defaultPriceWithDiscount = app_product_default_price_with_discount(product,userIdSage) %}#}
<style>
.card-img-top {
position: absolute;
top: -50px;
left: 50%;
margin-left: -50px;
width: 100px !important;
height: 100px;
transition: transform 0.3s ease;
}
.card:hover .card-img-top {
transform: scale(1.2);
}
.card {
font-family: \"Roboto\";
text-transform: lowercase;
margin-top: 30px;
padding-top: 30px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
height: 170px;
}
.card a {
color: inherit;
}
.card-title {
display: block;
font-weight: 600;
}
.card-title:first-letter {
text-transform: uppercase;
}
.card:hover .card-title {
color: #106eea;
}
@media (max-width: 991px) {
.col-md-3,
.col-6 {
flex: 0 0 50%;
max-width: 50%;
}
.card {
height: 250px;
padding-top: 10px;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.col-md-3,
.col-6 {
width: 100%;
flex: 0 0 50%;
max-width: 50%;
}
.card {
height: 250px;
width: 200px;
padding-top: 10px;
margin: 10px 100px 10px 90px;
}
}
@media (min-width: 991px) {
.card {
height: 250px;
}
}
</style>
<div class=\"col-6 col-sm-6 col-md-3 mt-5\">
<div class=\"card\">
<a href=\"{{ editmode ? '#':linkDetail }}\" class=\"px-3\">
<img class=\"card-img-top\" src=\"{{ (productImg) ? productImg.thumbnail('ProductImages') : '' }}\" alt=\"Card image cap\">
<div class=\"card-block text-center mt-5\">
<span class=\"card-title fs-6\">{{ product.getName() }}</span>
{# if product have propspeed brand hide price #}
{# {% if is_authenticated or product.marca != 15663 %}#}
{# <p class=\"card-position card-price fs-6\">{{ app_helper_price_format_spain(defaultPrice) }}€</p>#}
{# {% endif %}#}
</div>
</a>
</div>
</div>
", "Shop/product_teaser.html.twig", "/var/www/html/templates/Shop/product_teaser.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 2);
static $filters = array("escape" => 86);
static $functions = array("app_product_generate_link" => 3, "app_product_default_price" => 5);
try {
$this->sandbox->checkSecurity(
['set', 'if'],
['escape'],
['app_product_generate_link', 'app_product_default_price']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}