<?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;
/* @FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig */
class __TwigTemplate_24f8e90060db23ee4f42e051c0ea05d8 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_checkout_item' => [$this, 'block_page_checkout_item'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@fourtwosixBuyByQmUnit/storefront/page/checkout/checkout-item.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", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"));
$this->parent = $this->loadTemplate("@fourtwosixBuyByQmUnit/storefront/page/checkout/checkout-item.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.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_page_checkout_item($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", "page_checkout_item"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_checkout_item"));
// line 4
echo "
";
// line 5
if ((($context["controllerAction"] ?? null) != "finishPage")) {
// line 6
echo " ";
// line 7
echo " ";
$context["productUnitAkeneoKey"] = (($__internal_compile_0 = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, (($__internal_compile_1 = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "cart", [], "any", false, false, false, 7), "data", [], "any", false, false, false, 7), "elements", [], "any", false, false, false, 7)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1[("product-" . sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "id", [], "any", false, false, false, 7))] ?? null) : null), "unit", [], "any", false, false, false, 7), "translated", [], "any", false, false, false, 7), "customFields", [], "any", false, false, false, 7)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["akeneo_key"] ?? null) : null);
// line 8
echo " ";
$context["productPurchaseUnit"] = sw_get_attribute($this->env, $this->source, (($__internal_compile_2 = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "cart", [], "any", false, false, false, 8), "data", [], "any", false, false, false, 8), "elements", [], "any", false, false, false, 8)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[("product-" . sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "id", [], "any", false, false, false, 8))] ?? null) : null), "purchaseUnit", [], "any", false, false, false, 8);
// line 9
echo " ";
// line 10
echo " ";
} else {
// line 11
echo " ";
$context["productUnitAkeneoKey"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "price", [], "any", false, false, false, 11), "referencePrice", [], "any", false, false, false, 11), "unitName", [], "any", false, false, false, 11);
// line 12
echo " ";
$context["productPurchaseUnit"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "price", [], "any", false, false, false, 12), "referencePrice", [], "any", false, false, false, 12), "purchaseUnit", [], "any", false, false, false, 12);
// line 13
echo " ";
}
// line 14
echo "
";
// line 15
$context["enableUnitConversion"] = ((( // line 16
($context["productUnitAkeneoKey"] ?? null) !== "set") && ( // line 17
($context["productUnitAkeneoKey"] ?? null) !== "box")) && (( // line 18
($context["productPurchaseUnit"] ?? null) !== null) && (($context["productPurchaseUnit"] ?? null) !== 1.0)));
// line 19
echo "
";
// line 20
if ((sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "type", [], "any", false, false, false, 20) == "product")) {
// line 21
echo " ";
if (($context["enableUnitConversion"] ?? null)) {
// line 22
echo " ";
$this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/checkout-item-fourtwosixBuyByQmUnit.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 22)->display($context);
// line 23
echo " ";
} else {
// line 24
echo " ";
$this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/checkout-item-storefront.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 24)->display($context);
// line 25
echo " ";
}
// line 26
echo " ";
} elseif ((sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "type", [], "any", false, false, false, 26) == "payment_cost")) {
// line 27
echo " ";
// line 28
echo " ";
$this->loadTemplate("@FourtwosixPaymentSurcharge/storefront/page/checkout/checkout-item.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 28)->displayBlock("page_checkout_item", $context);
echo "
";
} elseif ((sw_get_attribute($this->env, $this->source, // line 29
($context["lineItem"] ?? null), "type", [], "any", false, false, false, 29) == "promotion")) {
// line 30
echo " ";
if (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "extensions", [], "any", false, false, false, 30), "fourtwosixThemeExtension", [], "any", false, false, false, 30), "deliveryDiscount", [], "any", false, false, false, 30)) {
// line 31
echo " ";
$this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/fts-checkout-item.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 31)->display($context);
// line 32
echo " ";
} elseif ( !sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["lineItem"] ?? null), "extensions", [], "any", false, false, false, 32), "fourtwosixThemeExtension", [], "any", false, false, false, 32), "isApplied", [], "any", false, false, false, 32)) {
// line 33
echo " ";
$this->loadTemplate("@Storefront/storefront/page/checkout/checkout-item.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 33)->displayBlock("page_checkout_item", $context);
echo "
";
}
// line 35
echo "
";
} else {
// line 37
echo " ";
$this->loadTemplate("@Storefront/storefront/page/checkout/checkout-item.html.twig", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", 37)->displayBlock("page_checkout_item", $context);
echo "
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 154 => 37, 150 => 35, 144 => 33, 141 => 32, 138 => 31, 135 => 30, 133 => 29, 128 => 28, 126 => 27, 123 => 26, 120 => 25, 117 => 24, 114 => 23, 111 => 22, 108 => 21, 106 => 20, 103 => 19, 101 => 18, 100 => 17, 99 => 16, 98 => 15, 95 => 14, 92 => 13, 89 => 12, 86 => 11, 83 => 10, 81 => 9, 78 => 8, 75 => 7, 73 => 6, 71 => 5, 68 => 4, 58 => 3, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/page/checkout/checkout-item.html.twig' %}
{% block page_checkout_item %}
{% if controllerAction != \"finishPage\" %}
{# @fourtwosix-edit: if usePluginQmUnit is true we use code copied from fourtwosixBuyByQmUnit otherwise from fourtwosixAddPurchaseUnit #}
{% set productUnitAkeneoKey = page.cart.data.elements[\"product-\"~ lineItem.id].unit.translated.customFields[\"akeneo_key\"] %}
{% set productPurchaseUnit = page.cart.data.elements[\"product-\"~ lineItem.id].purchaseUnit %}
{# @fourtwosix-edit: Added productPurchaseUnit !== 1.0 to avoid showing it for every stuck with packboxstk = 1 #}
{% else %}
{% set productUnitAkeneoKey = lineItem.price.referencePrice.unitName %}
{% set productPurchaseUnit = lineItem.price.referencePrice.purchaseUnit %}
{% endif %}
{% set enableUnitConversion =
productUnitAkeneoKey !== \"set\" and
productUnitAkeneoKey !== \"box\" and
(productPurchaseUnit !== null and productPurchaseUnit !== 1.0) %}
{% if lineItem.type == \"product\" %}
{% if enableUnitConversion %}
{% sw_include \"storefront/page/checkout/checkout-item-fourtwosixBuyByQmUnit.html.twig\" %}
{% else %}
{% sw_include \"storefront/page/checkout/checkout-item-storefront.html.twig\" %}
{% endif %}
{% elseif lineItem.type == \"payment_cost\" %}
{# @fourtwosix-edit: if is a surcharge use the plugins template #}
{{ block(\"page_checkout_item\", \"@FourtwosixPaymentSurcharge/storefront/page/checkout/checkout-item.html.twig\") }}
{% elseif lineItem.type == \"promotion\" %}
{% if lineItem.extensions.fourtwosixThemeExtension.deliveryDiscount %}
{% sw_include \"@FourtwosixPaymentSurcharge/storefront/page/checkout/fts-checkout-item.html.twig\" %}
{% elseif not lineItem.extensions.fourtwosixThemeExtension.isApplied %}
{{ block(\"page_checkout_item\", \"@Storefront/storefront/page/checkout/checkout-item.html.twig\") }}
{% endif %}
{% else %}
{{ block(\"page_checkout_item\", \"@Storefront/storefront/page/checkout/checkout-item.html.twig\") }}
{% endif %}
{% endblock %}", "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig", "/var/www/dev.artecon.426.agency/custom/plugins/FourtwosixThemeExtension/src/Resources/views/storefront/page/checkout/checkout-item.html.twig");
}
}