<?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;
/* @NetiNextGoogleCustomerReviews/storefront/base.html.twig */
class __TwigTemplate_150b8bc87b83bb21cfed566d8c8cea8e7ddf7ffe180a9acabab11c1836a07a06 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'base_script_hmr_mode' => [$this, 'block_base_script_hmr_mode'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@NetzpShopmanager6/storefront/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NetiNextGoogleCustomerReviews/storefront/base.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NetiNextGoogleCustomerReviews/storefront/base.html.twig"));
$this->parent = $this->loadTemplate("@NetzpShopmanager6/storefront/base.html.twig", "@NetiNextGoogleCustomerReviews/storefront/base.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_base_script_hmr_mode($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_script_hmr_mode"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_script_hmr_mode"));
// line 4
echo " ";
$this->displayParentBlock("base_script_hmr_mode", $context, $blocks);
echo "
";
// line 6
if ((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 6), "NetiNextGoogleCustomerReviewsFrontend", [], "any", false, false, false, 6) || sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, // line 7
($context["page"] ?? null), "extensions", [], "any", false, false, false, 7), "netiNextGoogleCustomerReviewsFinish", [], "any", false, false, false, 7))) {
// line 8
echo "
<script src=\"https://apis.google.com/js/platform.js?onload=netiPlatformLoaded\" async defer></script>
<script type=\"text/javascript\">
window.netiPlatformLoaded = function() {
";
// line 12
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 12), "NetiNextGoogleCustomerReviewsFrontend", [], "any", false, false, false, 12)) {
// line 13
echo " ";
$context["struct"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 13), "NetiNextGoogleCustomerReviewsFrontend", [], "any", false, false, false, 13);
// line 14
echo " var ratingBadgeContainer = document.createElement('div');
document.body.appendChild(ratingBadgeContainer);
window.gapi.load('ratingbadge', function() {
window.gapi.ratingbadge.render(
ratingBadgeContainer,
{
merchant_id: \"";
// line 22
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "merchantId", [], "any", false, false, false, 22), "html", null, true);
echo "\",
position: \"";
// line 23
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "position", [], "any", false, false, false, 23), "html", null, true);
echo "\"
}
);
});
";
}
// line 28
echo "
";
// line 29
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 29), "netiNextGoogleCustomerReviewsFinish", [], "any", false, false, false, 29)) {
// line 30
echo " ";
$context["struct"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "extensions", [], "any", false, false, false, 30), "netiNextGoogleCustomerReviewsFinish", [], "any", false, false, false, 30);
// line 31
echo " window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
merchant_id: \"";
// line 34
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "merchantId", [], "any", false, false, false, 34), "html", null, true);
echo "\",
order_id: \"";
// line 35
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "orderId", [], "any", false, false, false, 35), "html", null, true);
echo "\",
email: \"";
// line 36
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "email", [], "any", false, false, false, 36), "html", null, true);
echo "\",
delivery_country: \"";
// line 37
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "deliveryCountry", [], "any", false, false, false, 37), "html", null, true);
echo "\",
estimated_delivery_date: \"";
// line 38
echo sw_escape_filter($this->env, twig_date_format_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "estimatedDeliveryDate", [], "any", false, false, false, 38), "Y-m-d"), "html", null, true);
echo "\",
";
// line 39
if (sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "optionalFields", [], "any", false, false, false, 39)) {
// line 40
echo " ";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "optionalFields", [], "any", false, false, false, 40), "html", null, true);
echo "
";
}
// line 42
echo " ";
if ((twig_length_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "products", [], "any", false, false, false, 42)) > 0)) {
// line 43
echo " products: ";
echo call_user_func_array($this->env->getFilter('json_encode')->getCallable(), [sw_get_attribute($this->env, $this->source, ($context["struct"] ?? null), "products", [], "any", false, false, false, 43)]);
echo "
";
}
// line 45
echo " }
);
});
";
}
// line 49
echo " };
</script>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@NetiNextGoogleCustomerReviews/storefront/base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 166 => 49, 160 => 45, 154 => 43, 151 => 42, 145 => 40, 143 => 39, 139 => 38, 135 => 37, 131 => 36, 127 => 35, 123 => 34, 118 => 31, 115 => 30, 113 => 29, 110 => 28, 102 => 23, 98 => 22, 88 => 14, 85 => 13, 83 => 12, 77 => 8, 75 => 7, 74 => 6, 68 => 4, 58 => 3, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_script_hmr_mode %}
{{ parent() }}
{% if page.extensions.NetiNextGoogleCustomerReviewsFrontend
or page.extensions.netiNextGoogleCustomerReviewsFinish %}
<script src=\"https://apis.google.com/js/platform.js?onload=netiPlatformLoaded\" async defer></script>
<script type=\"text/javascript\">
window.netiPlatformLoaded = function() {
{% if page.extensions.NetiNextGoogleCustomerReviewsFrontend %}
{% set struct = page.extensions.NetiNextGoogleCustomerReviewsFrontend %}
var ratingBadgeContainer = document.createElement('div');
document.body.appendChild(ratingBadgeContainer);
window.gapi.load('ratingbadge', function() {
window.gapi.ratingbadge.render(
ratingBadgeContainer,
{
merchant_id: \"{{ struct.merchantId }}\",
position: \"{{ struct.position }}\"
}
);
});
{% endif %}
{% if page.extensions.netiNextGoogleCustomerReviewsFinish %}
{% set struct = page.extensions.netiNextGoogleCustomerReviewsFinish %}
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
merchant_id: \"{{ struct.merchantId }}\",
order_id: \"{{ struct.orderId }}\",
email: \"{{ struct.email }}\",
delivery_country: \"{{ struct.deliveryCountry }}\",
estimated_delivery_date: \"{{ struct.estimatedDeliveryDate|date(\"Y-m-d\") }}\",
{% if struct.optionalFields %}
{{ struct.optionalFields }}
{% endif %}
{% if struct.products|length > 0 %}
products: {{ struct.products|json_encode|raw }}
{% endif %}
}
);
});
{% endif %}
};
</script>
{% endif %}
{% endblock %}
", "@NetiNextGoogleCustomerReviews/storefront/base.html.twig", "/srv/users/liamoriasw6/apps/liamoriasw6/custom/plugins/NetiNextGoogleCustomerReviews/src/Resources/views/storefront/base.html.twig");
}
}