<?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.html.twig */
class __TwigTemplate_70b0d1f47c7bdd4c1fe4e91b0d7437ef extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 5
return "@SyliusShop/layout.html.twig";
}
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.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.html.twig"));
// line 1
$context["preview"] = ("open_marketplace_vendor_product_listings_preview" == twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 1, $this->source); })()), "request", [], "any", false, false, false, 1), "attributes", [], "any", false, false, false, 1), "get", [0 => "_route"], "method", false, false, false, 1));
// line 2
if (((true == (isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 2, $this->source); })())) && array_key_exists("product_listing", $context))) {
// line 3
$context["product"] = $this->extensions['BitBag\OpenMarketplace\Component\Core\Common\Twig\ConvertDraftToProductExtension']->convertDraftToProduct(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.', 3, $this->source); })()), "latestDraft", [], "any", false, false, false, 3));
}
// line 5
$this->parent = $this->loadTemplate("@SyliusShop/layout.html.twig", "@SyliusShop/Product/show.html.twig", 5);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 7
public function block_title($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(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, 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); })()), "name", [], "any", false, false, false, 7), "html", null, true);
echo " | ";
$this->displayParentBlock("title", $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 9
public function block_content($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(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 10
echo " ";
// line 11
echo " ";
if (((array_key_exists("isPreview", $context)) ? (_twig_default_filter((isset($context["isPreview"]) || array_key_exists("isPreview", $context) ? $context["isPreview"] : (function () { throw new RuntimeError('Variable "isPreview" does not exist.', 11, $this->source); })()), false)) : (false))) {
// line 12
echo " <div class=\"ui info message\">
<div class=\"header\">
<i class=\"eye icon\"></i>
Preview Mode - Admin Only
</div>
<p>You are viewing this product in preview mode. This product may not be visible to regular users.</p>
";
// line 18
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.', 18, $this->source); })()), "enabled", [], "any", false, false, false, 18)) {
// line 19
echo " <p><strong>Note:</strong> This product is currently <strong>disabled</strong>.</p>
";
}
// line 21
echo " </div>
<div class=\"ui clearing hidden divider\"></div>
";
}
// line 24
echo "
";
// line 25
$this->loadTemplate("@SyliusShop/Product/Show/_breadcrumb.html.twig", "@SyliusShop/Product/show.html.twig", 25)->display($context);
// line 26
echo " <div class=\"ui hidden divider\"></div>
";
// line 28
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.header", $context);
echo "
";
// line 30
$context["hasFullSupplierInfo"] = $this->extensions['BitBag\OpenMarketplace\Component\Core\Common\Twig\SupplierInfoExtension']->isFullSupplierInfo(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.', 30, $this->source); })()), "vendor", [], "any", false, false, false, 30), "organization", [], "any", false, false, false, 30));
// line 31
echo " ";
$context["hasImages"] = !twig_test_empty(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.', 31, $this->source); })()), "images", [], "any", false, false, false, 31));
// line 32
echo " ";
$context["showImages"] = ((isset($context["hasFullSupplierInfo"]) || array_key_exists("hasFullSupplierInfo", $context) ? $context["hasFullSupplierInfo"] : (function () { throw new RuntimeError('Variable "hasFullSupplierInfo" does not exist.', 32, $this->source); })()) && (isset($context["hasImages"]) || array_key_exists("hasImages", $context) ? $context["hasImages"] : (function () { throw new RuntimeError('Variable "hasImages" does not exist.', 32, $this->source); })()));
// line 33
echo " <div class=\"product-detail-layout ";
echo (( !(isset($context["showImages"]) || array_key_exists("showImages", $context) ? $context["showImages"] : (function () { throw new RuntimeError('Variable "showImages" does not exist.', 33, $this->source); })())) ? ("no-supplier-images") : (""));
echo "\">
<div class=\"product-images-section\">
";
// line 35
if ((isset($context["showImages"]) || array_key_exists("showImages", $context) ? $context["showImages"] : (function () { throw new RuntimeError('Variable "showImages" does not exist.', 35, $this->source); })())) {
// line 36
echo " ";
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.left_sidebar", $context);
echo "
";
}
// line 38
echo " </div>
<div class=\"product-summary-section\">
<div class=\"ui top attached large tabular menu product-tabs\">
<a class=\"item active\" data-tab=\"summary\">";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.product.tabs.summary"), "html", null, true);
echo "</a>
</div>
<div class=\"ui bottom attached tab segment product-tabs active\" data-tab=\"summary\">
";
// line 45
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.right_sidebar", $context);
echo "
</div>
</div>
<div class=\"product-tabs-section\">
";
// line 50
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.content_left_column", $context);
echo "
</div>
<div class=\"product-forms-section\">
";
// line 54
if ($this->extensions['MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 55
echo " <div class=\"wrapper-cont trigger-element\">
<ul class=\"tab-conts-box-cont form-tabs\">
<li class=\"tab-hyf active\" data-tab=\"rfq\">
";
// line 58
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.product.tabs.rfq"), "html", null, true);
echo "
</li>
";
// line 61
echo " ";
// line 64
echo " </ul>
</div>
";
}
// line 67
echo " ";
if ($this->extensions['MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 68
echo " <div class=\"tab-cont-content-cont\">
";
// line 69
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.content_right_column", $context);
echo "
</div>
";
} else {
// line 72
echo " ";
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.content_right_column", $context);
echo "
";
}
// line 74
echo " </div>
</div>
";
// line 77
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.content", $context);
echo "
";
// line 78
if ($this->extensions['MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
// line 79
echo " <div class=\"rectangle-group sticky-header\">
<div class=\"sticky-buttons-group\" style=\"justify-content: center;\">
<div class=\"btn\" data-tab=\"rfq\" style=\"width: auto; flex: 0 0 auto;\">";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.product.tabs.rfq"), "html", null, true);
echo "</div>
";
// line 83
echo " ";
// line 84
echo " </div>
</div>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 89
public function block_javascripts($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(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 90
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script type=\"text/javascript\">
lightbox.option({
'albumLabel': '";
// line 94
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.lightbox.image_album_label"), "js"), "html", null, true);
echo "'
});
// Pass translations to download handler
window.downloadTranslations = {
rate_limit_header: '";
// line 99
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.rate_limit_header"), "js"), "html", null, true);
echo "',
rate_limit_wait: '";
// line 100
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.rate_limit_wait"), "js"), "html", null, true);
echo "',
download_failed: '";
// line 101
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.download_failed"), "js"), "html", null, true);
echo "',
download_failed_status: '";
// line 102
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.download_failed_status"), "js"), "html", null, true);
echo "',
download_error_network: '";
// line 103
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.download_error_network"), "js"), "html", null, true);
echo "',
verify_human: '";
// line 104
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.verify_human"), "js"), "html", null, true);
echo "',
loading: '";
// line 105
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("open_marketplace.ui.loading"), "js"), "html", null, true);
echo "'
};
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 307 => 105, 303 => 104, 299 => 103, 295 => 102, 291 => 101, 287 => 100, 283 => 99, 275 => 94, 267 => 90, 257 => 89, 244 => 84, 242 => 83, 238 => 81, 234 => 79, 232 => 78, 228 => 77, 223 => 74, 217 => 72, 211 => 69, 208 => 68, 205 => 67, 200 => 64, 198 => 61, 193 => 58, 188 => 55, 186 => 54, 179 => 50, 171 => 45, 165 => 42, 159 => 38, 153 => 36, 151 => 35, 145 => 33, 142 => 32, 139 => 31, 137 => 30, 132 => 28, 128 => 26, 126 => 25, 123 => 24, 118 => 21, 114 => 19, 112 => 18, 104 => 12, 101 => 11, 99 => 10, 89 => 9, 68 => 7, 57 => 5, 54 => 3, 52 => 2, 50 => 1, 37 => 5,);
}
public function getSourceContext()
{
return new Source("{% set preview = 'open_marketplace_vendor_product_listings_preview' == app.request.attributes.get('_route') %}
{% if true == preview and product_listing is defined %}
{% set product = convert_draft_to_product(product_listing.latestDraft) %}
{% endif %}
{% extends '@SyliusShop/layout.html.twig' %}
{% block title %}{{ product.name }} | {{ parent() }}{% endblock %}
{% block content %}
{# Preview mode banner for admin-only product preview #}
{% if isPreview|default(false) %}
<div class=\"ui info message\">
<div class=\"header\">
<i class=\"eye icon\"></i>
Preview Mode - Admin Only
</div>
<p>You are viewing this product in preview mode. This product may not be visible to regular users.</p>
{% if not product.enabled %}
<p><strong>Note:</strong> This product is currently <strong>disabled</strong>.</p>
{% endif %}
</div>
<div class=\"ui clearing hidden divider\"></div>
{% endif %}
{% include '@SyliusShop/Product/Show/_breadcrumb.html.twig' %}
<div class=\"ui hidden divider\"></div>
{{ sylius_template_event('sylius.shop.product.show.header', _context) }}
{% set hasFullSupplierInfo = isFullSupplierInfo(product.vendor.organization) %}
{% set hasImages = product.images is not empty %}
{% set showImages = hasFullSupplierInfo and hasImages %}
<div class=\"product-detail-layout {{ not showImages ? 'no-supplier-images' : '' }}\">
<div class=\"product-images-section\">
{% if showImages %}
{{ sylius_template_event('sylius.shop.product.show.left_sidebar', _context) }}
{% endif %}
</div>
<div class=\"product-summary-section\">
<div class=\"ui top attached large tabular menu product-tabs\">
<a class=\"item active\" data-tab=\"summary\">{{ 'app.ui.product.tabs.summary'|trans }}</a>
</div>
<div class=\"ui bottom attached tab segment product-tabs active\" data-tab=\"summary\">
{{ sylius_template_event('sylius.shop.product.show.right_sidebar', _context) }}
</div>
</div>
<div class=\"product-tabs-section\">
{{ sylius_template_event('sylius.shop.product.show.content_left_column', _context) }}
</div>
<div class=\"product-forms-section\">
{% if is_mobile() %}
<div class=\"wrapper-cont trigger-element\">
<ul class=\"tab-conts-box-cont form-tabs\">
<li class=\"tab-hyf active\" data-tab=\"rfq\">
{{ 'app.ui.product.tabs.rfq'|trans }}
</li>
{# Temporarily disabled - only RFQ will be shown on product details page #}
{# <li class=\"tab-hyf\" data-tab=\"inquiry\">
{{ 'app.ui.product.tabs.contact_vendor'|trans }}
</li> #}
</ul>
</div>
{% endif %}
{% if is_mobile() %}
<div class=\"tab-cont-content-cont\">
{{ sylius_template_event('sylius.shop.product.show.content_right_column', _context) }}
</div>
{% else %}
{{ sylius_template_event('sylius.shop.product.show.content_right_column', _context) }}
{% endif %}
</div>
</div>
{{ sylius_template_event('sylius.shop.product.show.content', _context) }}
{% if is_mobile() %}
<div class=\"rectangle-group sticky-header\">
<div class=\"sticky-buttons-group\" style=\"justify-content: center;\">
<div class=\"btn\" data-tab=\"rfq\" style=\"width: auto; flex: 0 0 auto;\">{{ 'app.ui.product.tabs.rfq'|trans }}</div>
{# Temporarily disabled - only RFQ will be shown on product details page #}
{# <div class=\"btn\" data-tab=\"inquiry\">{{ 'app.ui.product.tabs.contact_vendor'|trans }}</div> #}
</div>
</div>
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type=\"text/javascript\">
lightbox.option({
'albumLabel': '{{ 'sylius.lightbox.image_album_label'|trans|escape('js') }}'
});
// Pass translations to download handler
window.downloadTranslations = {
rate_limit_header: '{{ 'open_marketplace.ui.rate_limit_header'|trans|escape('js') }}',
rate_limit_wait: '{{ 'open_marketplace.ui.rate_limit_wait'|trans|escape('js') }}',
download_failed: '{{ 'open_marketplace.ui.download_failed'|trans|escape('js') }}',
download_failed_status: '{{ 'open_marketplace.ui.download_failed_status'|trans|escape('js') }}',
download_error_network: '{{ 'open_marketplace.ui.download_error_network'|trans|escape('js') }}',
verify_human: '{{ 'open_marketplace.ui.verify_human'|trans|escape('js') }}',
loading: '{{ 'open_marketplace.ui.loading'|trans|escape('js') }}'
};
</script>
{% endblock %}
", "@SyliusShop/Product/show.html.twig", "/srv/open_marketplace/templates/bundles/SyliusShopBundle/Product/show.html.twig");
}
}