<?php
use Twig\Environment;
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;
/* Favorite/favorite.twig */
class __TwigTemplate_2ab185c45fa655e77fa57d0678ee7062 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "default_frame.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", "Favorite/favorite.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Favorite/favorite.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "Favorite/favorite.twig", 1);
$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_javascript($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", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 4
echo " <script>
var localfavo = localStorage.getItem('favo');
if(localfavo) {
var lsfavo = JSON.parse(localfavo);
console.log(lsfavo);
if (lsfavo.length){
for (i=0;i<lsfavo.length;i++) {
var html = '<li class=\"ec-shelfGrid__item position-relative pb-4\">';
html += '<a href=\"https://tanzoec.apteq5x.com/products/detail/' + lsfavo[i][0] + '\">';
html += '<p class=\"ec-shelfGrid__item-image\">';
html += '<img src=\"/html/upload/save_image/' + lsfavo[i][1] + '\" alt=\"' + lsfavo[i][2] + '\">';
html += '</p><p>' + lsfavo[i][2] + '</P>';
html += '<p class=\"price02-default\">' + lsfavo[i][3] + '</p></a>';
html += '<span onclick=\"del_favo(' + lsfavo[i][0] + ')\" class=\"delete_favo position-absolute text-white d-flex justify-content-center align-items-center\"><i class=\"bi bi-trash3\"></i></span>';
html += '</li>';
\$('#favo_list').append(html);
}
} else {
\$('#favo_list').append('<li class=\"p-3\">お気に入りが登録されていません</li>');
}
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 30
public function block_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", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 31
echo " <div class=\"ec-pageHeader\">
<h1>";
// line 32
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りリスト"), "html", null, true);
echo "</h1>
</div>
<div class=\"ec-shelfRole\">
<ul id=\"favo_list\" class=\"ec-shelfGrid\">
</ul>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Favorite/favorite.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 118 => 32, 115 => 31, 105 => 30, 71 => 4, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% block javascript %}
<script>
var localfavo = localStorage.getItem('favo');
if(localfavo) {
var lsfavo = JSON.parse(localfavo);
console.log(lsfavo);
if (lsfavo.length){
for (i=0;i<lsfavo.length;i++) {
var html = '<li class=\"ec-shelfGrid__item position-relative pb-4\">';
html += '<a href=\"https://tanzoec.apteq5x.com/products/detail/' + lsfavo[i][0] + '\">';
html += '<p class=\"ec-shelfGrid__item-image\">';
html += '<img src=\"/html/upload/save_image/' + lsfavo[i][1] + '\" alt=\"' + lsfavo[i][2] + '\">';
html += '</p><p>' + lsfavo[i][2] + '</P>';
html += '<p class=\"price02-default\">' + lsfavo[i][3] + '</p></a>';
html += '<span onclick=\"del_favo(' + lsfavo[i][0] + ')\" class=\"delete_favo position-absolute text-white d-flex justify-content-center align-items-center\"><i class=\"bi bi-trash3\"></i></span>';
html += '</li>';
\$('#favo_list').append(html);
}
} else {
\$('#favo_list').append('<li class=\"p-3\">お気に入りが登録されていません</li>');
}
}
</script>
{% endblock %}
{% block main %}
<div class=\"ec-pageHeader\">
<h1>{{ 'お気に入りリスト'|trans }}</h1>
</div>
<div class=\"ec-shelfRole\">
<ul id=\"favo_list\" class=\"ec-shelfGrid\">
</ul>
</div>
{% endblock %}", "Favorite/favorite.twig", "/home/apteq5/apteq5x.com/public_html/tanzoec/app/template/tanzo/Favorite/favorite.twig");
}
public function checkSecurity()
{
static $tags = array();
static $filters = array("escape" => 32, "trans" => 32);
static $functions = array();
try {
$this->sandbox->checkSecurity(
[],
['escape', 'trans'],
[]
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}