var/cache/dev/twig/3e/3e1795d18d65085050748f6e46ce6d3d.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @SyliusShop/Product/Show/_inventory.html.twig */
  14. class __TwigTemplate_03c829c1a09955127de797d659282b3e extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_inventory.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_inventory.html.twig"));
  33.         // line 1
  34.         if ((twig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "empty", [], "method"falsefalsefalse1) || ((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); })()), "simple", [], "any"falsefalsefalse1) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "first", [], "any"falsefalsefalse1), "isTracked", [], "any"falsefalsefalse1)) &&  !(<= (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "first", [], "any"falsefalsefalse1), "onHand", [], "any"falsefalsefalse1) - twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse1), "first", [], "any"falsefalsefalse1), "onHold", [], "any"falsefalsefalse1)))))) {
  35.             // line 2
  36.             echo "    ";
  37.             // line 3
  38.             echo "    <div class=\"alert alert-primary\" id=\"sylius-product-out-of-stock\" ";
  39.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-out-of-stock");
  40.             echo ">
  41.         ";
  42.             // line 4
  43.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.out_of_stock"), "html"nulltrue);
  44.             echo "
  45.     </div>
  46. ";
  47.         } elseif (((twig_get_attribute($this->env$this->source,         // line 6
  48. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'6$this->source); })()), "simple", [], "any"falsefalsefalse6) &&  !twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse6), "first", [], "any"falsefalsefalse6), "isTracked", [], "any"falsefalsefalse6)) && (== twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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); })()), "enabledVariants", [], "any"falsefalsefalse6), "first", [], "any"falsefalsefalse6), "onHand", [], "any"falsefalsefalse6)))) {
  49.             // line 7
  50.             echo "    <div class=\"alert alert-primary\" id=\"sylius-product-out-of-stock-long-term\" ";
  51.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-out-of-stock-long-term");
  52.             echo ">
  53.         ";
  54.             // line 8
  55.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.out_of_stock_long_term"), "html"nulltrue);
  56.             echo "
  57.     </div>
  58. ";
  59.         } else {
  60.             // line 11
  61.             echo "    ";
  62.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_cart_add_item", ["template" => "@SyliusShop/Product/Show/_addToCart.html.twig""productId" => 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.'11$this->source); })()), "id", [], "any"falsefalsefalse11)]));
  63.             echo "
  64. ";
  65.         }
  66.         
  67.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68.         
  69.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70.     }
  71.     public function getTemplateName()
  72.     {
  73.         return "@SyliusShop/Product/Show/_inventory.html.twig";
  74.     }
  75.     public function isTraitable()
  76.     {
  77.         return false;
  78.     }
  79.     public function getDebugInfo()
  80.     {
  81.         return array (  70 => 11,  64 => 8,  59 => 7,  57 => 6,  52 => 4,  47 => 3,  45 => 2,  43 => 1,);
  82.     }
  83.     public function getSourceContext()
  84.     {
  85.         return new Source("{% if product.enabledVariants.empty() or (product.simple and product.enabledVariants.first.isTracked and not (1 <= (product.enabledVariants.first.onHand - product.enabledVariants.first.onHold))) %}
  86.     {#{% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}#}
  87.     <div class=\"alert alert-primary\" id=\"sylius-product-out-of-stock\" {{ sylius_test_html_attribute('product-out-of-stock') }}>
  88.         {{ 'sylius.ui.out_of_stock'|trans }}
  89.     </div>
  90. {% elseif product.simple and not product.enabledVariants.first.isTracked and 0 == product.enabledVariants.first.onHand %}
  91.     <div class=\"alert alert-primary\" id=\"sylius-product-out-of-stock-long-term\" {{ sylius_test_html_attribute('product-out-of-stock-long-term') }}>
  92.         {{ 'app.ui.out_of_stock_long_term'|trans }}
  93.     </div>
  94. {% else %}
  95.     {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  96. {% endif %}
  97. ""@SyliusShop/Product/Show/_inventory.html.twig""/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Show/_inventory.html.twig");
  98.     }
  99. }