var/cache/dev_h00a6008ac8d83daed65bb1b250bc45b1/twig/5a/5a4d6fcd15d42705028ef1748ac3d2b753dcc66777fef3e0b7328016c1b9a8de.php line 60

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig */
  16. class __TwigTemplate_24f8e90060db23ee4f42e051c0ea05d8 extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->blocks = [
  25.             'page_checkout_item' => [$this'block_page_checkout_item'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@fourtwosixBuyByQmUnit/storefront/page/checkout/checkout-item.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"));
  40.         $this->parent $this->loadTemplate("@fourtwosixBuyByQmUnit/storefront/page/checkout/checkout-item.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"2);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_page_checkout_item($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_checkout_item"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_checkout_item"));
  55.         // line 4
  56.         echo "
  57.     ";
  58.         // line 5
  59.         if ((($context["controllerAction"] ?? null) != "finishPage")) {
  60.             // line 6
  61.             echo "        ";
  62.             // line 7
  63.             echo "        ";
  64.             $context["productUnitAkeneoKey"] = (($__internal_compile_0 sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, (($__internal_compile_1 sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "cart", [], "any"falsefalsefalse7), "data", [], "any"falsefalsefalse7), "elements", [], "any"falsefalsefalse7)) && 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"falsefalsefalse7))] ?? null) : null), "unit", [], "any"falsefalsefalse7), "translated", [], "any"falsefalsefalse7), "customFields", [], "any"falsefalsefalse7)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["akeneo_key"] ?? null) : null);
  65.             // line 8
  66.             echo "        ";
  67.             $context["productPurchaseUnit"] = sw_get_attribute($this->env$this->source, (($__internal_compile_2 sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "cart", [], "any"falsefalsefalse8), "data", [], "any"falsefalsefalse8), "elements", [], "any"falsefalsefalse8)) && 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"falsefalsefalse8))] ?? null) : null), "purchaseUnit", [], "any"falsefalsefalse8);
  68.             // line 9
  69.             echo "        ";
  70.             // line 10
  71.             echo "    ";
  72.         } else {
  73.             // line 11
  74.             echo "        ";
  75.             $context["productUnitAkeneoKey"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "price", [], "any"falsefalsefalse11), "referencePrice", [], "any"falsefalsefalse11), "unitName", [], "any"falsefalsefalse11);
  76.             // line 12
  77.             echo "        ";
  78.             $context["productPurchaseUnit"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "price", [], "any"falsefalsefalse12), "referencePrice", [], "any"falsefalsefalse12), "purchaseUnit", [], "any"falsefalsefalse12);
  79.             // line 13
  80.             echo "    ";
  81.         }
  82.         // line 14
  83.         echo "
  84.     ";
  85.         // line 15
  86.         $context["enableUnitConversion"] = (((        // line 16
  87. ($context["productUnitAkeneoKey"] ?? null) !== "set") && (        // line 17
  88. ($context["productUnitAkeneoKey"] ?? null) !== "box")) && ((        // line 18
  89. ($context["productPurchaseUnit"] ?? null) !== null) && (($context["productPurchaseUnit"] ?? null) !== 1.0)));
  90.         // line 19
  91.         echo "
  92.     ";
  93.         // line 20
  94.         if ((sw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "type", [], "any"falsefalsefalse20) == "product")) {
  95.             // line 21
  96.             echo "        ";
  97.             if (($context["enableUnitConversion"] ?? null)) {
  98.                 // line 22
  99.                 echo "            ";
  100.                 $this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/checkout-item-fourtwosixBuyByQmUnit.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"22)->display($context);
  101.                 // line 23
  102.                 echo "        ";
  103.             } else {
  104.                 // line 24
  105.                 echo "            ";
  106.                 $this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/checkout-item-storefront.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"24)->display($context);
  107.                 // line 25
  108.                 echo "        ";
  109.             }
  110.             // line 26
  111.             echo "    ";
  112.         } elseif ((sw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "type", [], "any"falsefalsefalse26) == "payment_cost")) {
  113.             // line 27
  114.             echo "        ";
  115.             // line 28
  116.             echo "        ";
  117.             $this->loadTemplate("@FourtwosixPaymentSurcharge/storefront/page/checkout/checkout-item.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"28)->displayBlock("page_checkout_item"$context);
  118.             echo "
  119.     ";
  120.         } elseif ((sw_get_attribute($this->env$this->source,         // line 29
  121. ($context["lineItem"] ?? null), "type", [], "any"falsefalsefalse29) == "promotion")) {
  122.             // line 30
  123.             echo "        ";
  124.             if (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "extensions", [], "any"falsefalsefalse30), "fourtwosixThemeExtension", [], "any"falsefalsefalse30), "deliveryDiscount", [], "any"falsefalsefalse30)) {
  125.                 // line 31
  126.                 echo "            ";
  127.                 $this->loadTemplate("@FourtwosixThemeExtension/storefront/page/checkout/fts-checkout-item.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"31)->display($context);
  128.                 // line 32
  129.                 echo "        ";
  130.             } elseif ( !sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["lineItem"] ?? null), "extensions", [], "any"falsefalsefalse32), "fourtwosixThemeExtension", [], "any"falsefalsefalse32), "isApplied", [], "any"falsefalsefalse32)) {
  131.                 // line 33
  132.                 echo "            ";
  133.                 $this->loadTemplate("@Storefront/storefront/page/checkout/checkout-item.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"33)->displayBlock("page_checkout_item"$context);
  134.                 echo "
  135.         ";
  136.             }
  137.             // line 35
  138.             echo "
  139.     ";
  140.         } else {
  141.             // line 37
  142.             echo "        ";
  143.             $this->loadTemplate("@Storefront/storefront/page/checkout/checkout-item.html.twig""@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig"37)->displayBlock("page_checkout_item"$context);
  144.             echo "
  145.     ";
  146.         }
  147.         
  148.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  149.         
  150.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  151.     }
  152.     public function getTemplateName()
  153.     {
  154.         return "@FourtwosixThemeExtension/storefront/page/checkout/checkout-item.html.twig";
  155.     }
  156.     public function isTraitable()
  157.     {
  158.         return false;
  159.     }
  160.     public function getDebugInfo()
  161.     {
  162.         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,);
  163.     }
  164.     public function getSourceContext()
  165.     {
  166.         return new Source("{% sw_extends '@Storefront/storefront/page/checkout/checkout-item.html.twig' %}
  167. {% block page_checkout_item %}
  168.     {% if controllerAction != \"finishPage\" %}
  169.         {# @fourtwosix-edit: if usePluginQmUnit is true we use code copied from fourtwosixBuyByQmUnit otherwise from fourtwosixAddPurchaseUnit #}
  170.         {% set productUnitAkeneoKey = page.cart.data.elements[\"product-\"~ lineItem.id].unit.translated.customFields[\"akeneo_key\"] %}
  171.         {% set productPurchaseUnit =  page.cart.data.elements[\"product-\"~ lineItem.id].purchaseUnit %}
  172.         {# @fourtwosix-edit: Added productPurchaseUnit !== 1.0 to avoid showing it for every stuck with packboxstk = 1  #}
  173.     {% else %}
  174.         {% set productUnitAkeneoKey = lineItem.price.referencePrice.unitName %}
  175.         {% set productPurchaseUnit =  lineItem.price.referencePrice.purchaseUnit %}
  176.     {% endif %}
  177.     {% set enableUnitConversion =
  178.         productUnitAkeneoKey !== \"set\" and
  179.         productUnitAkeneoKey !== \"box\" and
  180.         (productPurchaseUnit !== null and productPurchaseUnit !== 1.0) %}
  181.     {% if lineItem.type == \"product\" %}
  182.         {% if enableUnitConversion %}
  183.             {% sw_include \"storefront/page/checkout/checkout-item-fourtwosixBuyByQmUnit.html.twig\" %}
  184.         {% else %}
  185.             {% sw_include \"storefront/page/checkout/checkout-item-storefront.html.twig\" %}
  186.         {% endif %}
  187.     {% elseif lineItem.type == \"payment_cost\" %}
  188.         {# @fourtwosix-edit: if is a surcharge use the plugins template #}
  189.         {{ block(\"page_checkout_item\", \"@FourtwosixPaymentSurcharge/storefront/page/checkout/checkout-item.html.twig\") }}
  190.     {% elseif lineItem.type == \"promotion\" %}
  191.         {% if  lineItem.extensions.fourtwosixThemeExtension.deliveryDiscount %}
  192.             {%  sw_include \"@FourtwosixPaymentSurcharge/storefront/page/checkout/fts-checkout-item.html.twig\" %}
  193.         {% elseif not lineItem.extensions.fourtwosixThemeExtension.isApplied %}
  194.             {{ block(\"page_checkout_item\", \"@Storefront/storefront/page/checkout/checkout-item.html.twig\") }}
  195.         {% endif %}
  196.     {% else %}
  197.         {{ block(\"page_checkout_item\", \"@Storefront/storefront/page/checkout/checkout-item.html.twig\") }}
  198.     {% endif %}
  199. {% 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");
  200.     }
  201. }