<?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;
/* @SyliusShop/Product/Show/_outOfStock.html.twig */
class __TwigTemplate_7108188dad3227288f115408d9839e16 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "@SyliusShop/Product/Show/_outOfStock.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_outOfStock.html.twig"));
// line 1
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_shop_partial_availability_notifier_create", ["productVariantId" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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); })()), "variants", [], "any", false, false, false, 1), "first", [], "any", false, false, false, 1), "id", [], "any", false, false, false, 1), "template" => "@SyliusShop/Product/Show/_availability_notifier.html.twig"]));
echo "
";
// line 3
if ((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.', 3, $this->source); })()), "simple", [], "any", false, false, false, 3) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "variants", [], "any", false, true, false, 3), "first", [], "any", true, true, false, 3))) {
// line 4
echo " ";
if ( !$this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env, $this->source, 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.', 4, $this->source); })()), "variants", [], "any", false, false, false, 4), "first", [], "any", false, false, false, 4))) {
echo "
";
// line 5
if ( !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 5, $this->source); })()), "variants", [], "any", false, false, false, 5), "first", [], "any", false, false, false, 5), "restockingDate", [], "any", false, false, false, 5))) {
// line 6
echo " ";
if ((twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 6, $this->source); })()), "variants", [], "any", false, false, false, 6), "first", [], "any", false, false, false, 6), "restockingDate", [], "any", false, false, false, 6), "U") > twig_date_format_filter($this->env, "now", "U"))) {
// line 7
echo " <span class=\"text-danger\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.the_product_will_be_available_on"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 7, $this->source); })()), "variants", [], "any", false, false, false, 7), "first", [], "any", false, false, false, 7), "restockingDate", [], "any", false, false, false, 7), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.restocking_date_format")), "html", null, true);
echo "</span>
";
}
// line 9
echo " ";
}
// line 10
echo " ";
}
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_outOfStock.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 71 => 10, 68 => 9, 60 => 7, 57 => 6, 55 => 5, 50 => 4, 48 => 3, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{{ render(path('app_shop_partial_availability_notifier_create', { 'productVariantId' : product.variants.first.id, 'template' : '@SyliusShop/Product/Show/_availability_notifier.html.twig' })) }}
{% if product.simple and product.variants.first is defined %}
{% if not sylius_inventory_is_available(product.variants.first) %}
{% if product.variants.first.restockingDate is not null %}
{% if product.variants.first.restockingDate|date('U') > 'now'|date('U') %}
<span class=\"text-danger\">{{ 'app.product.the_product_will_be_available_on'|trans }} {{ product.variants.first.restockingDate|date('app.product.restocking_date_format'|trans) }}</span>
{% endif %}
{% endif %}
{% endif %}
{% endif %}", "@SyliusShop/Product/Show/_outOfStock.html.twig", "/var/www/html/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_outOfStock.html.twig");
}
}