<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
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;
/* @MolliePayments/storefront/base.html.twig */
class __TwigTemplate_3788469b870caea23cb3899583a94fc7 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'base_main' => [$this, 'block_base_main'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@DreiscSeoPro/storefront/base.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", "@MolliePayments/storefront/base.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@MolliePayments/storefront/base.html.twig"));
$this->parent = $this->loadTemplate("@DreiscSeoPro/storefront/base.html.twig", "@MolliePayments/storefront/base.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_base_main($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", "base_main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_main"));
// line 4
echo "
";
// line 7
echo " ";
$context["onlyShowHere"] = ["frontend.checkout.confirm.page" => "", "frontend.checkout.cart.page" => "cart", "frontend.navigation.page" => "plp", "frontend.account.edit-order.page" => "", "frontend.detail.page" => "pdp"];
// line 14
echo "
";
// line 16
$context["currentRoute"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 16), "attributes", [], "any", false, false, false, 16), "get", [0 => "_route"], "method", false, false, false, 16);
// line 17
echo " ";
$context["includeJsInHeader"] = false;
// line 18
echo "
";
// line 20
echo " ";
if ((((($context["currentRoute"] ?? null) == "frontend.checkout.cart.page") || (($context["currentRoute"] ?? null) == "frontend.checkout.confirm.page")) || (($context["currentRoute"] ?? null) == "frontend.account.edit-order.page"))) {
// line 21
echo " ";
$context["includeJsInHeader"] = true;
// line 22
echo " ";
}
// line 23
echo "
";
// line 25
echo " ";
if (((($context["mollie_applepaydirect_enabled"] ?? null) == true) || (($context["mollie_applepay_enabled"] ?? null) == true))) {
// line 26
echo " ";
if ((twig_in_filter(($context["currentRoute"] ?? null), twig_get_array_keys_filter(($context["onlyShowHere"] ?? null))) && !twig_in_filter((($__internal_compile_0 = ($context["onlyShowHere"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[($context["currentRoute"] ?? null)] ?? null) : null), ($context["mollie_applepaydirect_restrictions"] ?? null)))) {
// line 27
echo " ";
$context["includeJsInHeader"] = true;
// line 28
echo " ";
}
// line 29
echo " ";
if (!twig_in_filter("offcanvas", ($context["mollie_applepaydirect_restrictions"] ?? null))) {
// line 30
echo " ";
$context["includeJsInHeader"] = true;
// line 31
echo " ";
}
// line 32
echo " ";
}
// line 33
echo "
<script>
window.mollie_javascript_use_shopware = '";
// line 35
echo sw_escape_filter($this->env, ($context["mollie_javascript_use_shopware"] ?? null), "html", null, true);
echo "'
</script>
";
// line 38
if (((($context["mollie_javascript_use_shopware"] ?? null) != "1") && (($context["includeJsInHeader"] ?? null) == true))) {
// line 39
echo " <script src=\"";
echo sw_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/molliepayments/mollie-payments.js", "asset"), "html", null, true);
echo "\"></script>
";
}
// line 41
echo "
";
// line 42
$this->displayParentBlock("base_main", $context, $blocks);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@MolliePayments/storefront/base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 144 => 42, 141 => 41, 135 => 39, 133 => 38, 127 => 35, 123 => 33, 120 => 32, 117 => 31, 114 => 30, 111 => 29, 108 => 28, 105 => 27, 102 => 26, 99 => 25, 96 => 23, 93 => 22, 90 => 21, 87 => 20, 84 => 18, 81 => 17, 79 => 16, 75 => 14, 72 => 7, 68 => 4, 58 => 3, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_main %}
{# pages where apple pay requires js with their mollie_applepaydirect_restrictions names as values #}
{% set onlyShowHere = {
'frontend.checkout.confirm.page' : '',
'frontend.checkout.cart.page' : 'cart',
'frontend.navigation.page' : 'plp',
'frontend.account.edit-order.page' : '',
'frontend.detail.page' : 'pdp'
} %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% set includeJsInHeader = false %}
{# js always required on this pages #}
{% if currentRoute == 'frontend.checkout.cart.page' or currentRoute == 'frontend.checkout.confirm.page' or currentRoute == 'frontend.account.edit-order.page' %}
{% set includeJsInHeader = true %}
{% endif %}
{# requirement check for apple pay direct #}
{% if mollie_applepaydirect_enabled == true or mollie_applepay_enabled == true %}
{% if currentRoute in onlyShowHere|keys and onlyShowHere[currentRoute] not in mollie_applepaydirect_restrictions %}
{% set includeJsInHeader = true %}
{% endif %}
{% if 'offcanvas' not in mollie_applepaydirect_restrictions %}
{% set includeJsInHeader = true %}
{% endif %}
{% endif %}
<script>
window.mollie_javascript_use_shopware = '{{ mollie_javascript_use_shopware }}'
</script>
{% if mollie_javascript_use_shopware != '1' and includeJsInHeader == true %}
<script src=\"{{ asset('bundles/molliepayments/mollie-payments.js', 'asset') }}\"></script>
{% endif %}
{{ parent() }}
{% endblock %}", "@MolliePayments/storefront/base.html.twig", "/var/www/vhosts/devmt.de/httpdocs/shopware-ce/custom/plugins/MolliePayments/src/Resources/views/storefront/base.html.twig");
}
}