<?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/_inventory.html.twig */
class __TwigTemplate_61f90c3907fdece6853c98f4d9258b98 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/_inventory.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/_inventory.html.twig"));
// line 1
if ((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); })()), "enabledVariants", [], "any", false, false, false, 1), "empty", [], "method", false, false, false, 1) || ((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", false, false, false, 1) && !$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.', 1, $this->source); })()), "enabledVariants", [], "any", false, false, false, 1), "first", [], "any", false, false, false, 1))) && (false == (isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 1, $this->source); })()))))) {
// line 2
echo " <div class=\"ui small negative icon message\" id=\"sylius-product-out-of-stock\" ";
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-out-of-stock");
echo ">
<i class=\"remove icon\"></i>
<div class=\"content\">
";
// line 5
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.out_of_stock"), "html", null, true);
echo "
</div>
</div>
";
// line 8
$this->loadTemplate("@BitBagSyliusWishlistPlugin/Common/_addToWishlist.html.twig", "@SyliusShop/Product/Show/_inventory.html.twig", 8)->display($context);
} else {
// line 10
echo " ";
if ((true == (isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 10, $this->source); })()))) {
// line 11
echo " ";
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", false, false, false, 11), "template" => "@SyliusShop/Product/Show/_addToCart.html.twig"]));
echo "
";
} else {
// line 13
echo " ";
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", false, false, false, 13)]));
echo "
";
}
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_inventory.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 70 => 13, 64 => 11, 61 => 10, 58 => 8, 52 => 5, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if product.enabledVariants.empty() or product.simple and not sylius_inventory_is_available(product.enabledVariants.first) and false == preview %}
<div class=\"ui small negative icon message\" id=\"sylius-product-out-of-stock\" {{ sylius_test_html_attribute('product-out-of-stock') }}>
<i class=\"remove icon\"></i>
<div class=\"content\">
{{ 'sylius.ui.out_of_stock'|trans }}
</div>
</div>
{% include '@BitBagSyliusWishlistPlugin/Common/_addToWishlist.html.twig' %}
{% else %}
{% if true == preview %}
{{ render(url('open_marketplace_vendor_product_listings_add_to_cart_preview', {'code': product_listing.code, 'template': '@SyliusShop/Product/Show/_addToCart.html.twig'})) }}
{% else %}
{{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
{% endif %}
{% endif %}
", "@SyliusShop/Product/Show/_inventory.html.twig", "/srv/open_marketplace/templates/bundles/SyliusShopBundle/Product/Show/_inventory.html.twig");
}
}