var/cache/dev/twig/1e/1e925cbf58e1349eeeab17f3a2e3d1c8.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_61f90c3907fdece6853c98f4d9258b98 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) &&  !$this->env->getFunction('sylius_inventory_is_available')->getCallable()(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), "first", [], "any"falsefalsefalse1))) && (false == (isset($context["preview"]) || array_key_exists("preview"$context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.'1$this->source); })()))))) {
  35.             // line 2
  36.             echo "    <div class=\"ui small negative icon message\" id=\"sylius-product-out-of-stock\"  ";
  37.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-out-of-stock");
  38.             echo ">
  39.         <i class=\"remove icon\"></i>
  40.         <div class=\"content\">
  41.             ";
  42.             // line 5
  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.     </div>
  47.     ";
  48.             // line 8
  49.             $this->loadTemplate("@BitBagSyliusWishlistPlugin/Common/_addToWishlist.html.twig""@SyliusShop/Product/Show/_inventory.html.twig"8)->display($context);
  50.         } else {
  51.             // line 10
  52.             echo "    ";
  53.             if ((true == (isset($context["preview"]) || array_key_exists("preview"$context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.'10$this->source); })()))) {
  54.                 // line 11
  55.                 echo "        ";
  56.                 echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("open_marketplace_vendor_product_listings_add_to_cart_preview", ["code" => twig_get_attribute($this->env$this->source, (isset($context["product_listing"]) || array_key_exists("product_listing"$context) ? $context["product_listing"] : (function () { throw new RuntimeError('Variable "product_listing" does not exist.'11$this->source); })()), "code", [], "any"falsefalsefalse11), "template" => "@SyliusShop/Product/Show/_addToCart.html.twig"]));
  57.                 echo "
  58.     ";
  59.             } else {
  60.                 // line 13
  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.'13$this->source); })()), "id", [], "any"falsefalsefalse13)]));
  63.                 echo "
  64.     ";
  65.             }
  66.         }
  67.         
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  69.         
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  71.     }
  72.     public function getTemplateName()
  73.     {
  74.         return "@SyliusShop/Product/Show/_inventory.html.twig";
  75.     }
  76.     public function isTraitable()
  77.     {
  78.         return false;
  79.     }
  80.     public function getDebugInfo()
  81.     {
  82.         return array (  70 => 13,  64 => 11,  61 => 10,  58 => 8,  52 => 5,  45 => 2,  43 => 1,);
  83.     }
  84.     public function getSourceContext()
  85.     {
  86.         return new Source("{% if product.enabledVariants.empty() or product.simple and not sylius_inventory_is_available(product.enabledVariants.first) and false == preview %}
  87.     <div class=\"ui small negative icon message\" id=\"sylius-product-out-of-stock\"  {{ sylius_test_html_attribute('product-out-of-stock') }}>
  88.         <i class=\"remove icon\"></i>
  89.         <div class=\"content\">
  90.             {{ 'sylius.ui.out_of_stock'|trans }}
  91.         </div>
  92.     </div>
  93.     {% include '@BitBagSyliusWishlistPlugin/Common/_addToWishlist.html.twig' %}
  94. {% else %}
  95.     {% if true == preview %}
  96.         {{ render(url('open_marketplace_vendor_product_listings_add_to_cart_preview', {'code': product_listing.code, 'template': '@SyliusShop/Product/Show/_addToCart.html.twig'})) }}
  97.     {% else %}
  98.         {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  99.     {% endif %}
  100. {% endif %}
  101. ""@SyliusShop/Product/Show/_inventory.html.twig""/srv/open_marketplace/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
  102.     }
  103. }