var/cache/dev_h3c3440ec00b8b6b995f16213b12b8432/twig/aa/aa3a5746f927c83869b7cc065eea3c45.php line 48

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. /* @NdTheme/storefront/page/recent-products/products.html.twig */
  16. class __TwigTemplate_42edc367e205a40656df1c6d05c3e1d2 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->parent false;
  25.         $this->blocks = [
  26.             'element_product_slider_controls' => [$this'block_element_product_slider_controls'],
  27.         ];
  28.     }
  29.     protected function doDisplay(array $context, array $blocks = [])
  30.     {
  31.         $macros $this->macros;
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  33.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@NdTheme/storefront/page/recent-products/products.html.twig"));
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  35.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@NdTheme/storefront/page/recent-products/products.html.twig"));
  36.         // line 1
  37.         $context["elementId"] = twig_random($this->env);
  38.         // line 2
  39.         $this->displayBlock('element_product_slider_controls'$context$blocks);
  40.         // line 30
  41.         echo "<div class=\"!overflow-x-scroll hide-scrollbar slick-after-md flex slick-init slick-init-ajax slick-arrows-center slick-space-1 slick-equal-height slick-padding-left-8 md:!overflow-x-hidden lg:!grid lg:boxed-layout\"
  42. \t data-slick='{
  43.         \"infinite\": false,
  44. \t\t\"variableWidth\": true,
  45.         \"slidesToScroll\": 1,
  46. \t\t\"slidesToShow\": 5.5,
  47.         \"speed\": 800,
  48. \t\t\"prevArrow\": \"#prev-slide-";
  49.         // line 37
  50.         echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html"nulltrue);
  51.         echo "\",
  52. \t\t\"nextArrow\": \"#next-slide-";
  53.         // line 38
  54.         echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html"nulltrue);
  55.         echo "\",
  56. \t\t\"mobileFirst\": false,
  57. \t\t\"responsive\": [ { \"breakpoint\": 768, \"settings\": \"unslick\" } ]
  58.         }' id=\"recently-viewed\">
  59. \t";
  60.         // line 42
  61.         $context['_parent'] = $context;
  62.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["products"] ?? null), "elements", [], "any"falsefalsefalse42));
  63.         $context['loop'] = [
  64.           'parent' => $context['_parent'],
  65.           'index0' => 0,
  66.           'index'  => 1,
  67.           'first'  => true,
  68.         ];
  69.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  70.             $length count($context['_seq']);
  71.             $context['loop']['revindex0'] = $length 1;
  72.             $context['loop']['revindex'] = $length;
  73.             $context['loop']['length'] = $length;
  74.             $context['loop']['last'] = === $length;
  75.         }
  76.         foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  77.             // line 43
  78.             echo "\t\t<div class=\"product-slider-item !w-[232px] md:!w-[264px] mr-2\">
  79. \t\t\t";
  80.             // line 44
  81.             $this->loadTemplate("@Storefront/storefront/component/product/card/box.html.twig""@NdTheme/storefront/page/recent-products/products.html.twig"44)->display(twig_array_merge($context, ["layout" => sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source,             // line 45
  82. $context["product"], "boxLayout", [], "any"falsefalsefalse45), "value", [], "any"falsefalsefalse45), "displayMode" => sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source,             // line 46
  83. $context["product"], "displayMode", [], "any"falsefalsefalse46), "value", [], "any"falsefalsefalse46)]));
  84.             // line 48
  85.             echo "\t\t</div>
  86. \t";
  87.             ++$context['loop']['index0'];
  88.             ++$context['loop']['index'];
  89.             $context['loop']['first'] = false;
  90.             if (isset($context['loop']['length'])) {
  91.                 --$context['loop']['revindex0'];
  92.                 --$context['loop']['revindex'];
  93.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  94.             }
  95.         }
  96.         $_parent $context['_parent'];
  97.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  98.         $context array_intersect_key($context$_parent) + $_parent;
  99.         // line 50
  100.         echo "\t<div class=\"product-slider-item\">
  101. \t</div>
  102. \t<div class=\"product-slider-item\">
  103. \t</div>
  104. </div>
  105. ";
  106.         
  107.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  108.         
  109.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  110.     }
  111.     // line 2
  112.     public function block_element_product_slider_controls($context, array $blocks = [])
  113.     {
  114.         $macros $this->macros;
  115.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""element_product_slider_controls"));
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""element_product_slider_controls"));
  119.         // line 3
  120.         echo "\t<div class=\"flex justify-between\">
  121. \t\t<div class=\"mt-auto flex flex-col\">
  122. \t\t\t<span class=\"recently-viewed-products-subtitle mb-2 text-xs uppercase text-grey-900 font-bold font-accent tracking-wider md:text-sm\">";
  123.         // line 5
  124.         echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SwSanitizeTwigFilter']->sanitize($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("themeGlobal.recentlyViewedSubtitle"));
  125.         echo "</span>
  126. \t\t\t<span class=\"recently-viewed-products-title mb-6 text-2xl font-display font-bold md:text-4xl\">";
  127.         // line 6
  128.         echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SwSanitizeTwigFilter']->sanitize($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("themeGlobal.recentlyViewedTitle"));
  129.         echo "</span>
  130. \t\t</div>
  131. \t\t<div class=\"flex justify-end\">
  132. \t\t\t<div class=\"product-slider-controls-container mb-6 boxed-layout lg:mt-10 hidden md:block\">
  133. \t\t\t\t<div class=\"flex grid-gap-2 justify-end\">
  134. \t\t\t\t\t<button id=\"prev-slide-";
  135.         // line 11
  136.         echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html"nulltrue);
  137.         echo "\"
  138. \t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center\">
  139. \t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
  140. \t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
  141. \t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
  142. \t\t\t\t\t\t</svg>
  143. \t\t\t\t\t</button>
  144. \t\t\t\t\t<button id=\"next-slide-";
  145.         // line 18
  146.         echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html"nulltrue);
  147.         echo "\"
  148. \t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center rotate-180\">
  149. \t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
  150. \t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
  151. \t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
  152. \t\t\t\t\t\t</svg>
  153. \t\t\t\t\t</button>
  154. \t\t\t\t</div>
  155. \t\t\t</div>
  156. \t\t</div>
  157. \t</div>
  158. ";
  159.         
  160.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  161.         
  162.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  163.     }
  164.     public function getTemplateName()
  165.     {
  166.         return "@NdTheme/storefront/page/recent-products/products.html.twig";
  167.     }
  168.     public function isTraitable()
  169.     {
  170.         return false;
  171.     }
  172.     public function getDebugInfo()
  173.     {
  174.         return array (  159 => 18,  149 => 11,  141 => 6,  137 => 5,  133 => 3,  123 => 2,  107 => 50,  92 => 48,  90 => 46,  89 => 45,  88 => 44,  85 => 43,  68 => 42,  61 => 38,  57 => 37,  48 => 30,  46 => 2,  44 => 1,);
  175.     }
  176.     public function getSourceContext()
  177.     {
  178.         return new Source("{% set elementId = random() %}
  179. {% block element_product_slider_controls %}
  180. \t<div class=\"flex justify-between\">
  181. \t\t<div class=\"mt-auto flex flex-col\">
  182. \t\t\t<span class=\"recently-viewed-products-subtitle mb-2 text-xs uppercase text-grey-900 font-bold font-accent tracking-wider md:text-sm\">{{ \"themeGlobal.recentlyViewedSubtitle\"|trans|sw_sanitize }}</span>
  183. \t\t\t<span class=\"recently-viewed-products-title mb-6 text-2xl font-display font-bold md:text-4xl\">{{ \"themeGlobal.recentlyViewedTitle\"|trans|sw_sanitize }}</span>
  184. \t\t</div>
  185. \t\t<div class=\"flex justify-end\">
  186. \t\t\t<div class=\"product-slider-controls-container mb-6 boxed-layout lg:mt-10 hidden md:block\">
  187. \t\t\t\t<div class=\"flex grid-gap-2 justify-end\">
  188. \t\t\t\t\t<button id=\"prev-slide-{{ elementId }}\"
  189. \t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center\">
  190. \t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
  191. \t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
  192. \t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
  193. \t\t\t\t\t\t</svg>
  194. \t\t\t\t\t</button>
  195. \t\t\t\t\t<button id=\"next-slide-{{ elementId }}\"
  196. \t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center rotate-180\">
  197. \t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
  198. \t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
  199. \t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
  200. \t\t\t\t\t\t</svg>
  201. \t\t\t\t\t</button>
  202. \t\t\t\t</div>
  203. \t\t\t</div>
  204. \t\t</div>
  205. \t</div>
  206. {% endblock %}
  207. <div class=\"!overflow-x-scroll hide-scrollbar slick-after-md flex slick-init slick-init-ajax slick-arrows-center slick-space-1 slick-equal-height slick-padding-left-8 md:!overflow-x-hidden lg:!grid lg:boxed-layout\"
  208. \t data-slick='{
  209.         \"infinite\": false,
  210. \t\t\"variableWidth\": true,
  211.         \"slidesToScroll\": 1,
  212. \t\t\"slidesToShow\": 5.5,
  213.         \"speed\": 800,
  214. \t\t\"prevArrow\": \"#prev-slide-{{ elementId }}\",
  215. \t\t\"nextArrow\": \"#next-slide-{{ elementId }}\",
  216. \t\t\"mobileFirst\": false,
  217. \t\t\"responsive\": [ { \"breakpoint\": 768, \"settings\": \"unslick\" } ]
  218.         }' id=\"recently-viewed\">
  219. \t{% for product in products.elements %}
  220. \t\t<div class=\"product-slider-item !w-[232px] md:!w-[264px] mr-2\">
  221. \t\t\t{% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
  222. \t\t\t\t'layout': product.boxLayout.value,
  223. \t\t\t\t'displayMode': product.displayMode.value,
  224. \t\t\t} %}
  225. \t\t</div>
  226. \t{% endfor %}
  227. \t<div class=\"product-slider-item\">
  228. \t</div>
  229. \t<div class=\"product-slider-item\">
  230. \t</div>
  231. </div>
  232. ""@NdTheme/storefront/page/recent-products/products.html.twig""/var/www/dev/deployer/releases/56/custom/static-plugins/NdTheme/src/Resources/views/storefront/page/recent-products/products.html.twig");
  233.     }
  234. }