<?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;
/* Slivki/offers/teaser.html.twig */
class __TwigTemplate_1023ca9827bd9833d8f2a8dad53633ae50b8d543b8577d36b7c0b49c084d14ca extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'imageDiv' => [$this, 'block_imageDiv'],
'favorite' => [$this, 'block_favorite'],
];
}
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", "Slivki/offers/teaser.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/offers/teaser.html.twig"));
// line 1
$context["teaserAnchorClass"] = "";
// line 2
if (( !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 2, $this->source); })()), "isHideNoveltyLabel", [], "method", false, false, false, 2) && (0 >= twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 2, $this->source); })()), "getActiveSince", [], "method", false, false, false, 2), "diff", [0 => twig_date_converter($this->env)], "method", false, false, false, 2), "days", [], "any", false, false, false, 2), 5)))) {
// line 3
echo " ";
$context["teaserAnchorClass"] = "newProduct";
}
// line 5
$context["offerURL"] = ((array_key_exists("urlWithDomain", $context)) ? ((isset($context["urlWithDomain"]) || array_key_exists("urlWithDomain", $context) ? $context["urlWithDomain"] : (function () { throw new RuntimeError('Variable "urlWithDomain" does not exist.', 5, $this->source); })())) : ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL("Slivki:Default:details", twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 5, $this->source); })()), "getID", [], "method", false, false, false, 5), true)));
// line 6
$context["teaserStatDays"] = 30;
// line 7
$context["daysFromStrart"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_date_converter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 7, $this->source); })()), "getActiveSince", [], "any", false, false, false, 7))), "diff", [0 => twig_date_converter($this->env, "now")], "method", false, false, false, 7), "days", [], "any", false, false, false, 7);
// line 8
$context["daysFromStrart"] = (((-1 === twig_compare((isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 8, $this->source); })()), (isset($context["teaserStatDays"]) || array_key_exists("teaserStatDays", $context) ? $context["teaserStatDays"] : (function () { throw new RuntimeError('Variable "teaserStatDays" does not exist.', 8, $this->source); })())))) ? ((isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 8, $this->source); })())) : ((isset($context["teaserStatDays"]) || array_key_exists("teaserStatDays", $context) ? $context["teaserStatDays"] : (function () { throw new RuntimeError('Variable "teaserStatDays" does not exist.', 8, $this->source); })())));
// line 9
$context["daysFromStrart"] = (((0 === twig_compare((isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 9, $this->source); })()), 0))) ? (1) : ((isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 9, $this->source); })())));
// line 10
echo "
";
// line 11
if ((array_key_exists("isMailing", $context) && (isset($context["isMailing"]) || array_key_exists("isMailing", $context) ? $context["isMailing"] : (function () { throw new RuntimeError('Variable "isMailing" does not exist.', 11, $this->source); })()))) {
// line 12
echo " <input type=\"checkbox\" class=\"marketActionCheckBox\"/>
<input type=\"checkbox\" style=\"float: left;\" name=\"mainTeaser\" class=\"marketActionRadio\"/>
";
}
// line 15
echo "
<div class=\"stock-group-item\" id='action";
// line 16
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 16, $this->source); })()), "getID", [], "method", false, false, false, 16), "html", null, true);
echo "' data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 16, $this->source); })()), "getID", [], "method", false, false, false, 16), "html", null, true);
echo "\">
";
// line 17
$this->displayBlock('imageDiv', $context, $blocks);
// line 28
echo " <img class=\"image\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 28, $this->source); })()), "getTeaserMedia", [], "method", false, false, false, 28), 500, 324), "html", null, true);
echo "\"
alt=\"\"/>
";
// line 30
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_slice($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 30, $this->source); })()), "getShopMedias", [], "method", false, false, false, 30), 0, 8));
foreach ($context['_seq'] as $context["_key"] => $context["media"]) {
// line 31
echo " <img class=\"image d-none\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL($context["media"], 500, 324), "html", null, true);
echo "\"
alt=\"";
// line 32
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["media"], "getDescription", [], "method", false, false, false, 32), "html", null, true);
echo "\" border=\"0\"/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['media'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 34, $this->source); })()), "getShopMedias", [], "method", false, false, false, 34)), 8))) {
// line 35
echo " <div class=\"brazzers-more d-none\">
<div class=\"brazzers-more__wrapper\">
<div class=\"brazzers-more__icon\"></div>
<div class=\"brazzers-more__text\">Еще ";
// line 38
echo twig_escape_filter($this->env, (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 38, $this->source); })()), "getShopMedias", [], "method", false, false, false, 38)) - 3), "html", null, true);
echo " фото</div>
</div>
</div>
";
}
// line 42
echo " ";
if ((twig_get_attribute($this->env, $this->source, ($context["galleryVideos"] ?? null), "getVideos", [], "method", true, true, false, 42) && (1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["galleryVideos"]) || array_key_exists("galleryVideos", $context) ? $context["galleryVideos"] : (function () { throw new RuntimeError('Variable "galleryVideos" does not exist.', 42, $this->source); })()), "getVideos", [], "method", false, false, false, 42)), 0)))) {
// line 43
echo " <div class=\"story-teaser-img\">
<img src=\"/images/play-offer-story.svg\" alt=\"Истории\"/>
</div>
";
}
// line 47
echo " ";
if (( !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 47, $this->source); })()), "isHideNoveltyLabel", [], "method", false, false, false, 47) && (0 >= twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 47, $this->source); })()), "getRenewedOn", [], "method", false, false, false, 47), "diff", [0 => twig_date_converter($this->env)], "method", false, false, false, 47), "days", [], "any", false, false, false, 47), twig_constant("Slivki\\Services\\Category\\NewOfferCategoryService::NEW_OFFER_PERIOD_DAYS"))))) {
// line 48
echo " <div class=\"new-offer-watermark\">
Новая
</div>
";
}
// line 52
echo " ";
if (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 52, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 52)) && !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 52, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 52), "getDeliveryWorkingTime", [], "method", false, false, false, 52)))) {
// line 53
echo " ";
$context["workingDeliveryTime"] = twig_get_attribute($this->env, $this->source, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->jsonDecodeFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 53, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 53), "getDeliveryWorkingTime", [], "method", false, false, false, 53)), twig_date_format_filter($this->env, "now", "w"), [], "array", false, false, false, 53);
// line 54
echo " ";
$context["startTime"] = twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 54, $this->source); })()), "startTime", [], "any", false, false, false, 54), "H:i");
// line 55
echo " ";
$context["endTime"] = twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 55, $this->source); })()), "endTime", [], "any", false, false, false, 55), "H:i");
// line 56
echo " ";
$context["dayOff"] = twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 56, $this->source); })()), "dayOff", [], "any", false, false, false, 56);
// line 57
echo " ";
$context["nowTime"] = twig_date_format_filter($this->env, "now", "H:i");
// line 58
echo " ";
if (((0 === twig_compare((isset($context["startTime"]) || array_key_exists("startTime", $context) ? $context["startTime"] : (function () { throw new RuntimeError('Variable "startTime" does not exist.', 58, $this->source); })()), (isset($context["endTime"]) || array_key_exists("endTime", $context) ? $context["endTime"] : (function () { throw new RuntimeError('Variable "endTime" does not exist.', 58, $this->source); })()))) && !(isset($context["dayOff"]) || array_key_exists("dayOff", $context) ? $context["dayOff"] : (function () { throw new RuntimeError('Variable "dayOff" does not exist.', 58, $this->source); })()))) {
echo "ы
<a href=\"";
// line 59
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 59, $this->source); })()), "html", null, true);
echo "\" class=\"open-delivery-info d-none\" target=\"_blank\">ДОСТАВКА КРУГЛОСУТОЧНО</a>
";
}
// line 61
echo " ";
}
// line 62
echo " <a href=\"";
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 62, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\" class=\"details-link ";
echo twig_escape_filter($this->env, (isset($context["teaserAnchorClass"]) || array_key_exists("teaserAnchorClass", $context) ? $context["teaserAnchorClass"] : (function () { throw new RuntimeError('Variable "teaserAnchorClass" does not exist.', 62, $this->source); })()), "html", null, true);
echo "\">
";
// line 63
if (twig_trim_filter(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 63, $this->source); })()), "getCaptionName", [], "method", false, false, false, 63))) {
// line 64
echo " <div class=\"info-line\" style=\"background-color: ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 64, $this->source); })()), "getCaptionColor", [], "method", false, false, false, 64), "html", null, true);
echo ";\">
<div>";
// line 65
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 65, $this->source); })()), "getCaptionName", [], "method", false, false, false, 65), "html", null, true);
echo "</div>
</div>
";
}
// line 68
echo "
";
// line 69
if (twig_trim_filter(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 69, $this->source); })()), "getRegionalCaptionName", [], "method", false, false, false, 69))) {
// line 70
echo " <div class=\"info-line regional\"
style=\"background-color: ";
// line 71
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 71, $this->source); })()), "getRegionalCaptionColor", [], "method", false, false, false, 71), "html", null, true);
echo "; display: none;\">
<div>";
// line 72
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 72, $this->source); })()), "getRegionalCaptionName", [], "method", false, false, false, 72), "html", null, true);
echo "</div>
</div>
";
}
// line 75
echo "
</a>
";
// line 78
if ((twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 78, $this->source); })()), "getHint", [], "method", false, false, false, 78) && (0 !== twig_compare(twig_trim_filter(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 78, $this->source); })()), "getHint", [], "method", false, false, false, 78)), "")))) {
// line 79
echo " <div class=\"teaser-hint\">
<div class=\"teaser-hint-inner\">";
// line 80
echo twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 80, $this->source); })()), "getHint", [], "method", false, false, false, 80);
echo "</div>
</div>
";
}
// line 83
echo "
";
// line 84
if (((array_key_exists("showManicurePrice", $context) && (isset($context["showManicurePrice"]) || array_key_exists("showManicurePrice", $context) ? $context["showManicurePrice"] : (function () { throw new RuntimeError('Variable "showManicurePrice" does not exist.', 84, $this->source); })())) && twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 84, $this->source); })()), "getPrice", [], "method", false, false, false, 84))) {
// line 85
echo " <div class=\"info-line manicure-price\">
<div>Маникюр под ключ ";
// line 86
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 86, $this->source); })()), "getPrice", [], "method", false, false, false, 86), 2, ",", ""), "html", null, true);
echo " руб</div>
</div>
";
}
// line 89
echo "
</div>
";
// line 92
$context["supplierLogo"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getTeaserWatermark(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 92, $this->source); })()), "getID", [], "method", false, false, false, 92));
// line 93
echo "
";
// line 94
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 94, $this->source); })())), 0))) {
// line 95
echo " ";
$context["supplierLogoWidth"] = ((twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 95, $this->source); })()), "width", [], "any", false, false, false, 95)) ? (twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 95, $this->source); })()), "width", [], "any", false, false, false, 95)) : (65));
// line 96
echo " <div class=\"teaser--supplier-logo\">
<img style=\"";
// line 97
((twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 97, $this->source); })()), "width", [], "any", false, false, false, 97)) ? (print (twig_escape_filter($this->env, (("width:" . twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 97, $this->source); })()), "width", [], "any", false, false, false, 97)) . "px;"), "html", null, true))) : (print ("")));
((twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 97, $this->source); })()), "height", [], "any", false, false, false, 97)) ? (print (twig_escape_filter($this->env, (("height:" . twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 97, $this->source); })()), "height", [], "any", false, false, false, 97)) . "px;"), "html", null, true))) : (print ("")));
echo "\"
src=\"";
// line 98
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, (isset($context["supplierLogo"]) || array_key_exists("supplierLogo", $context) ? $context["supplierLogo"] : (function () { throw new RuntimeError('Variable "supplierLogo" does not exist.', 98, $this->source); })()), "watermark", [], "any", false, false, false, 98), (2 * (isset($context["supplierLogoWidth"]) || array_key_exists("supplierLogoWidth", $context) ? $context["supplierLogoWidth"] : (function () { throw new RuntimeError('Variable "supplierLogoWidth" does not exist.', 98, $this->source); })())), 0), "html", null, true);
echo "\" alt=\"\"/>
</div>
";
}
// line 101
echo " ";
$this->displayBlock('favorite', $context, $blocks);
// line 102
echo "
<div class=\"discount-label\">";
// line 103
((twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 103, $this->source); })()), "isWithoutCodes", [], "method", false, false, false, 103)) ? (print ("пока без скидки")) : (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 103, $this->source); })()), "getDiscountLabelText", [], "method", false, false, false, 103), "html", null, true))));
echo "</div>
<div class=\"top\">
";
// line 105
$context["rating"] = twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 105, $this->source); })()), "getRating", [], "method", false, false, false, 105);
// line 106
echo " ";
$context["ratingPercentage"] = (((isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 106, $this->source); })()) * 100) / 5);
// line 107
echo " ";
$context["ratingCount"] = $this->env->getRuntime('Slivki\Twig\GetCommentsCountTwigRuntime')->getOfferCommentsCount(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 107, $this->source); })()), "getID", [], "method", false, false, false, 107));
// line 108
echo "
<div class=\"d-flex align-items-center\">
";
// line 110
if (((1 === twig_compare((isset($context["ratingCount"]) || array_key_exists("ratingCount", $context) ? $context["ratingCount"] : (function () { throw new RuntimeError('Variable "ratingCount" does not exist.', 110, $this->source); })()), 0)) || (1 === twig_compare((isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 110, $this->source); })()), 0)))) {
// line 111
echo " <div class=\"star-ratings-css\">
";
// line 112
if ((1 === twig_compare((isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 112, $this->source); })()), 0))) {
// line 113
echo " <div class=\"star-ratings-css-top\" style=\"width: ";
echo twig_escape_filter($this->env, (isset($context["ratingPercentage"]) || array_key_exists("ratingPercentage", $context) ? $context["ratingPercentage"] : (function () { throw new RuntimeError('Variable "ratingPercentage" does not exist.', 113, $this->source); })()), "html", null, true);
echo "%\">
<span>★</span>
</div>
";
} else {
// line 117
echo " <div class=\"star-ratings-css-bottom\">
<span>★</span>
</div>
";
}
// line 121
echo " </div>
<div class=\"rating-value\" style=\"margin-right: 2px;\">";
// line 122
echo twig_escape_filter($this->env, twig_round((isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 122, $this->source); })()), 2, "ceil"), "html", null, true);
echo "</div>
<div class=\"rating-value\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title=\"Количество комментариев к данной акции\">
(";
// line 125
echo twig_escape_filter($this->env, $this->env->getRuntime('Slivki\Twig\GetCommentsCountTwigRuntime')->getOfferCommentsCount(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 125, $this->source); })()), "getID", [], "method", false, false, false, 125)), "html", null, true);
echo ")
</div>
";
}
// line 128
echo " </div>
";
// line 130
if ((1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 130, $this->source); })()), "getGeoLocations", [], "method", false, false, false, 130), "count", [], "method", false, false, false, 130), 0))) {
// line 131
echo " <div class=\"geo-location-block\">
<div class=\"distance\" data-toggle=\"distance-tooltip\" data-placement=\"top\"
data-original-title=\"Расстояние от Вас до объекта\">
<i class=\"slivki-icon slivki-icon-direction\"></i>
<img class='ajaxLoader' src='/images/ajax-loader-16x16.gif' alt='Загрузка...'/>
<span></span>
</div>
";
// line 138
$this->loadTemplate("Slivki/offers/geo_location_data.html.twig", "Slivki/offers/teaser.html.twig", 138)->display(twig_to_array(["offer" => (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 138, $this->source); })())]));
// line 139
echo " </div>
";
}
// line 141
echo " </div>
<div class=\"teaser-same-height\">
<div class=\"title\">
<a href=\"";
// line 145
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 145, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\" class=\"details-link \"
style=\"color: ";
// line 146
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 146, $this->source); })()), "getTitleFontColor", [], "method", false, false, false, 146), "html", null, true);
echo ";\">";
echo twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 146, $this->source); })()), "getTitle", [], "method", false, false, false, 146);
echo "</a>
</div>
</div>
<a class=\"details-link marketActionLink\" href=\"";
// line 150
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 150, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\">
<div class=\"address\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title=\"Ориентир\">";
// line 152
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 152, $this->source); })()), "getAddress", [], "method", false, false, false, 152), "html", null, true);
echo "</div>
</a>
<div class=\"bottom d-flex font-size-0680\">
";
// line 156
$context["daysLeft"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 156, $this->source); })()), "getActiveTill", [], "method", false, false, false, 156), "diff", [0 => twig_date_converter($this->env)], "method", false, false, false, 156), "days", [], "any", false, false, false, 156);
// line 157
echo "
";
// line 158
if ( !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 158, $this->source); })()), "isWithoutCodes", [], "method", false, false, false, 158)) {
// line 159
echo " <a href=\"";
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 159, $this->source); })()), "html", null, true);
echo "\" target=\"_blank\" class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Взято кодов за ";
// line 160
echo twig_escape_filter($this->env, (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 160, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([0 => "день", 1 => "дня", 2 => "дней"], (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 160, $this->source); })())), "html", null, true);
echo "'>
<i class=\"slivki-icon slivki-icon-users\"></i>
<span>";
// line 162
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getOfferMonthlyPurchaseCount(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 162, $this->source); })()), "getID", [], "method", false, false, false, 162)), "html", null, true);
echo "</span>
</a>
";
}
// line 165
echo "
<div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Просмотров за ";
// line 167
echo twig_escape_filter($this->env, (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 167, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([0 => "день", 1 => "дня", 2 => "дней"], (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 167, $this->source); })())), "html", null, true);
echo "'>
<i class=\"slivki-icon slivki-icon-eye\"></i>
<span>";
// line 169
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getOfferVisitCount((isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 169, $this->source); })())), "html", null, true);
echo "</span>
</div>
";
// line 172
if (( !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 172, $this->source); })()), "isInFreeCodesCategory", [], "method", false, false, false, 172) && !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 172, $this->source); })()), "isWithoutCodes", [], "method", false, false, false, 172))) {
// line 173
echo " <div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Кол-во продаж к кол-ву просмотров. <br> Конверсия за ";
// line 174
echo twig_escape_filter($this->env, (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 174, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([0 => "день", 1 => "дня", 2 => "дней"], (isset($context["daysFromStrart"]) || array_key_exists("daysFromStrart", $context) ? $context["daysFromStrart"] : (function () { throw new RuntimeError('Variable "daysFromStrart" does not exist.', 174, $this->source); })())), "html", null, true);
echo "'>
<img src=\"/images/stats-alt-2.svg\" style=\"margin: 0 .2em;\"/>
<span>";
// line 176
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getOfferConversion(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 176, $this->source); })()), "getID", [], "method", false, false, false, 176)), "html", null, true);
echo "%</span>
</div>
";
}
// line 179
echo "
";
// line 180
if ((((0 >= twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 180, $this->source); })()), "getActiveSince", [], "method", false, false, false, 180), twig_date_converter($this->env))) && (0 <= twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 180, $this->source); })()), "getActiveTill", [], "method", false, false, false, 180), twig_date_converter($this->env)))) && !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 180, $this->source); })()), "isWithoutCodes", [], "method", false, false, false, 180))) {
// line 181
echo " <div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Дней до окончания действия акции'>
<i class=\"slivki-icon slivki-icon-clock\"></i>
<span class=\"daystr\">";
// line 184
(((0 === twig_compare((isset($context["daysLeft"]) || array_key_exists("daysLeft", $context) ? $context["daysLeft"] : (function () { throw new RuntimeError('Variable "daysLeft" does not exist.', 184, $this->source); })()), 0))) ? (print (0.5)) : (print (twig_escape_filter($this->env, (isset($context["daysLeft"]) || array_key_exists("daysLeft", $context) ? $context["daysLeft"] : (function () { throw new RuntimeError('Variable "daysLeft" does not exist.', 184, $this->source); })()), "html", null, true))));
echo " ";
(((1 === twig_compare((isset($context["daysLeft"]) || array_key_exists("daysLeft", $context) ? $context["daysLeft"] : (function () { throw new RuntimeError('Variable "daysLeft" does not exist.', 184, $this->source); })()), 0))) ? (print (twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([0 => "день", 1 => "дня", 2 => "дней"], (isset($context["daysLeft"]) || array_key_exists("daysLeft", $context) ? $context["daysLeft"] : (function () { throw new RuntimeError('Variable "daysLeft" does not exist.', 184, $this->source); })())), "html", null, true))) : (print ("дня")));
echo "</span>
</div>
";
}
// line 187
echo "
</div>
<div class=\"w-100 d-flex\">
";
// line 190
if ((twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 190, $this->source); })()), "isOneOfOnlineOrderAllowedOnSite", [], "method", false, false, false, 190) && !twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 190, $this->source); })()), "isTireOnlineOrderAllowedOnSite", [], "method", false, false, false, 190))) {
// line 191
echo " <a href=\"";
echo twig_escape_filter($this->env, ((twig_in_filter(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 191, $this->source); })()), "getID", [], "method", false, false, false, 191), twig_constant("Slivki\\Entity\\Offer::FREESTYLE_OFFER_IDS"))) ? ($this->env->getRuntime('Slivki\Twig\GetLinkOnlineOrderRuntime')->getLinkGiftCertificateOnlineOrderByOnlyCode((isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 191, $this->source); })()))) : ($this->env->getRuntime('Slivki\Twig\GetLinkOnlineOrderRuntime')->getLinkOnlineOrder((isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 191, $this->source); })())))), "html", null, true);
echo "\"
class=\"top-code-online-order\">Онлайн-заказ</a>
";
} elseif (twig_get_attribute($this->env, $this->source, // line 193
(isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 193, $this->source); })()), "isTireOnlineOrderAllowedOnSite", [], "method", false, false, false, 193)) {
// line 194
echo " <a href=\"/online-zapis/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 194, $this->source); })()), "getID", [], "method", false, false, false, 194), "html", null, true);
echo "\" class=\"top-code-online-order\">Онлайн-запись</a>
";
}
// line 196
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 196, $this->source); })()), "isInFreeCodesCategory", [], "method", false, false, false, 196)) {
// line 197
echo " <div class=\"top-code\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Код скидки предоставляется сайтом бесплатно'>Код 0 руб.
</div>
";
}
// line 201
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 201, $this->source); })()), "getDeliveryTimeTeaser", [], "method", false, false, false, 201)) {
// line 202
echo " <div class=\"time-delivery d-flex justify-content-center align-items-center\">
<img width=\"22\" height=\"17\" class=\"mr-1\" src=\"/images/icon_avto.svg\"/>
<span class=\"color-white\">";
// line 204
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 204, $this->source); })()), "getDeliveryTimeTeaser", [], "method", false, false, false, 204), "html", null, true);
echo " мин</span>
</div>
";
}
// line 207
echo " </div>
";
// line 208
if (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 208, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 208)) && !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 208, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 208), "getDeliveryWorkingTime", [], "method", false, false, false, 208)))) {
// line 209
echo " ";
$context["workingDeliveryTime"] = twig_get_attribute($this->env, $this->source, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->jsonDecodeFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 209, $this->source); })()), "getOnlineOrderSettings", [], "method", false, false, false, 209), "getDeliveryWorkingTime", [], "method", false, false, false, 209)), twig_date_format_filter($this->env, "now", "w"), [], "array", false, false, false, 209);
// line 210
echo " ";
$context["startTime"] = twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 210, $this->source); })()), "startTime", [], "any", false, false, false, 210), "H:i");
// line 211
echo " ";
$context["endTime"] = twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 211, $this->source); })()), "endTime", [], "any", false, false, false, 211), "H:i");
// line 212
echo " ";
$context["dayOff"] = twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 212, $this->source); })()), "dayOff", [], "any", false, false, false, 212);
// line 213
echo " ";
$context["nowTime"] = twig_date_format_filter($this->env, "now", "H:i");
// line 214
echo "
";
// line 215
if ((((0 <= twig_compare((isset($context["nowTime"]) || array_key_exists("nowTime", $context) ? $context["nowTime"] : (function () { throw new RuntimeError('Variable "nowTime" does not exist.', 215, $this->source); })()), (isset($context["startTime"]) || array_key_exists("startTime", $context) ? $context["startTime"] : (function () { throw new RuntimeError('Variable "startTime" does not exist.', 215, $this->source); })()))) && (0 >= twig_compare((isset($context["nowTime"]) || array_key_exists("nowTime", $context) ? $context["nowTime"] : (function () { throw new RuntimeError('Variable "nowTime" does not exist.', 215, $this->source); })()), (isset($context["endTime"]) || array_key_exists("endTime", $context) ? $context["endTime"] : (function () { throw new RuntimeError('Variable "endTime" does not exist.', 215, $this->source); })())))) && !(isset($context["dayOff"]) || array_key_exists("dayOff", $context) ? $context["dayOff"] : (function () { throw new RuntimeError('Variable "dayOff" does not exist.', 215, $this->source); })()))) {
// line 216
echo " <p class=\"teaser-working-time-delivery open-delivery d-none\">Доставка до ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 216, $this->source); })()), "endTime", [], "any", false, false, false, 216), "html", null, true);
echo "</p>
";
} elseif ((((-1 === twig_compare( // line 217
(isset($context["nowTime"]) || array_key_exists("nowTime", $context) ? $context["nowTime"] : (function () { throw new RuntimeError('Variable "nowTime" does not exist.', 217, $this->source); })()), (isset($context["startTime"]) || array_key_exists("startTime", $context) ? $context["startTime"] : (function () { throw new RuntimeError('Variable "startTime" does not exist.', 217, $this->source); })()))) && (0 !== twig_compare((isset($context["startTime"]) || array_key_exists("startTime", $context) ? $context["startTime"] : (function () { throw new RuntimeError('Variable "startTime" does not exist.', 217, $this->source); })()), (isset($context["endTime"]) || array_key_exists("endTime", $context) ? $context["endTime"] : (function () { throw new RuntimeError('Variable "endTime" does not exist.', 217, $this->source); })())))) && !(isset($context["dayOff"]) || array_key_exists("dayOff", $context) ? $context["dayOff"] : (function () { throw new RuntimeError('Variable "dayOff" does not exist.', 217, $this->source); })()))) {
// line 218
echo " <p class=\"teaser-working-time-delivery closed-delivery d-none\">Закрыто. Доставка с ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["workingDeliveryTime"]) || array_key_exists("workingDeliveryTime", $context) ? $context["workingDeliveryTime"] : (function () { throw new RuntimeError('Variable "workingDeliveryTime" does not exist.', 218, $this->source); })()), "startTime", [], "any", false, false, false, 218), "html", null, true);
echo "</p>
";
} elseif (((0 === twig_compare( // line 219
(isset($context["startTime"]) || array_key_exists("startTime", $context) ? $context["startTime"] : (function () { throw new RuntimeError('Variable "startTime" does not exist.', 219, $this->source); })()), (isset($context["endTime"]) || array_key_exists("endTime", $context) ? $context["endTime"] : (function () { throw new RuntimeError('Variable "endTime" does not exist.', 219, $this->source); })()))) && !(isset($context["dayOff"]) || array_key_exists("dayOff", $context) ? $context["dayOff"] : (function () { throw new RuntimeError('Variable "dayOff" does not exist.', 219, $this->source); })()))) {
// line 220
echo " <p class=\"teaser-working-time-delivery open-delivery d-none\">Доставка круглосуточно</p>
";
} elseif ( // line 221
(isset($context["dayOff"]) || array_key_exists("dayOff", $context) ? $context["dayOff"] : (function () { throw new RuntimeError('Variable "dayOff" does not exist.', 221, $this->source); })())) {
// line 222
echo " <p class=\"teaser-working-time-delivery closed-delivery d-none\">Предзаказ</p>
";
}
// line 224
echo " ";
}
// line 225
echo " </div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 17
public function block_imageDiv($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", "imageDiv"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "imageDiv"));
// line 18
echo " ";
if (array_key_exists("noLazyLoad", $context)) {
// line 19
echo " <div class=\"images ";
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 19, $this->source); })()), "getShopMedias", [], "method", false, false, false, 19)), 0))) {
echo "tiaser-carousel";
}
echo "\"
style=\"display: block; background-image: url('";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 20, $this->source); })()), "getTeaserMedia", [], "method", false, false, false, 20), 250, 162), "html", null, true);
echo "')\"
onclick=\"window.open('";
// line 21
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 21, $this->source); })()), "html", null, true);
echo "' + location.search);\">
";
} else {
// line 23
echo " <div class=\"images lazy ";
if ((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 23, $this->source); })()), "getShopMedias", [], "method", false, false, false, 23)), 0))) {
echo "tiaser-carousel";
}
echo "\"
data-original=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, (isset($context["offer"]) || array_key_exists("offer", $context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.', 24, $this->source); })()), "getTeaserMedia", [], "method", false, false, false, 24), 500, 324), "html", null, true);
echo "\"
onclick=\"window.open('";
// line 25
echo twig_escape_filter($this->env, (isset($context["offerURL"]) || array_key_exists("offerURL", $context) ? $context["offerURL"] : (function () { throw new RuntimeError('Variable "offerURL" does not exist.', 25, $this->source); })()), "html", null, true);
echo "' + location.search);\">
";
}
// line 27
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 101
public function block_favorite($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", "favorite"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "favorite"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Slivki/offers/teaser.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 616 => 101, 606 => 27, 601 => 25, 597 => 24, 590 => 23, 585 => 21, 581 => 20, 574 => 19, 571 => 18, 561 => 17, 551 => 225, 548 => 224, 544 => 222, 542 => 221, 539 => 220, 537 => 219, 532 => 218, 530 => 217, 525 => 216, 523 => 215, 520 => 214, 517 => 213, 514 => 212, 511 => 211, 508 => 210, 505 => 209, 503 => 208, 500 => 207, 494 => 204, 490 => 202, 487 => 201, 481 => 197, 478 => 196, 472 => 194, 470 => 193, 464 => 191, 462 => 190, 457 => 187, 449 => 184, 444 => 181, 442 => 180, 439 => 179, 433 => 176, 426 => 174, 423 => 173, 421 => 172, 415 => 169, 408 => 167, 404 => 165, 398 => 162, 391 => 160, 386 => 159, 384 => 158, 381 => 157, 379 => 156, 372 => 152, 367 => 150, 358 => 146, 354 => 145, 348 => 141, 344 => 139, 342 => 138, 333 => 131, 331 => 130, 327 => 128, 321 => 125, 315 => 122, 312 => 121, 306 => 117, 298 => 113, 296 => 112, 293 => 111, 291 => 110, 287 => 108, 284 => 107, 281 => 106, 279 => 105, 274 => 103, 271 => 102, 268 => 101, 262 => 98, 257 => 97, 254 => 96, 251 => 95, 249 => 94, 246 => 93, 244 => 92, 239 => 89, 233 => 86, 230 => 85, 228 => 84, 225 => 83, 219 => 80, 216 => 79, 214 => 78, 209 => 75, 203 => 72, 199 => 71, 196 => 70, 194 => 69, 191 => 68, 185 => 65, 180 => 64, 178 => 63, 171 => 62, 168 => 61, 163 => 59, 158 => 58, 155 => 57, 152 => 56, 149 => 55, 146 => 54, 143 => 53, 140 => 52, 134 => 48, 131 => 47, 125 => 43, 122 => 42, 115 => 38, 110 => 35, 107 => 34, 99 => 32, 94 => 31, 90 => 30, 84 => 28, 82 => 17, 76 => 16, 73 => 15, 68 => 12, 66 => 11, 63 => 10, 61 => 9, 59 => 8, 57 => 7, 55 => 6, 53 => 5, 49 => 3, 47 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% set teaserAnchorClass = '' %}
{% if not offer.isHideNoveltyLabel() and offer.getActiveSince().diff(date()).days <= 5 %}
{% set teaserAnchorClass = 'newProduct' %}
{% endif %}
{% set offerURL = urlWithDomain is defined ? urlWithDomain : getURL(\"Slivki:Default:details\", offer.getID(), true) %}
{% set teaserStatDays = 30 %}
{% set daysFromStrart = date(offer.getActiveSince|date).diff(date('now')).days %}
{% set daysFromStrart = daysFromStrart < teaserStatDays ? daysFromStrart : teaserStatDays %}
{% set daysFromStrart = daysFromStrart == 0 ? 1 : daysFromStrart %}
{% if isMailing is defined and isMailing %}
<input type=\"checkbox\" class=\"marketActionCheckBox\"/>
<input type=\"checkbox\" style=\"float: left;\" name=\"mainTeaser\" class=\"marketActionRadio\"/>
{% endif %}
<div class=\"stock-group-item\" id='action{{ offer.getID() }}' data-id=\"{{ offer.getID() }}\">
{% block imageDiv %}
{% if noLazyLoad is defined %}
<div class=\"images {% if offer.getShopMedias()|length > 0 %}tiaser-carousel{% endif %}\"
style=\"display: block; background-image: url('{{ getImageURL(offer.getTeaserMedia(), 250, 162) }}')\"
onclick=\"window.open('{{ offerURL }}' + location.search);\">
{% else %}
<div class=\"images lazy {% if offer.getShopMedias()|length > 0 %}tiaser-carousel{% endif %}\"
data-original=\"{{ getImageURL(offer.getTeaserMedia(), 500, 324) }}\"
onclick=\"window.open('{{ offerURL }}' + location.search);\">
{% endif %}
{% endblock %}
<img class=\"image\" src=\"{{ getImageURL(offer.getTeaserMedia(), 500, 324) }}\"
alt=\"\"/>
{% for media in offer.getShopMedias()|slice(0, 8) %}
<img class=\"image d-none\" src=\"{{ getImageURL(media, 500, 324) }}\"
alt=\"{{ media.getDescription() }}\" border=\"0\"/>
{% endfor %}
{% if offer.getShopMedias()|length > 8 %}
<div class=\"brazzers-more d-none\">
<div class=\"brazzers-more__wrapper\">
<div class=\"brazzers-more__icon\"></div>
<div class=\"brazzers-more__text\">Еще {{ offer.getShopMedias()|length - 3 }} фото</div>
</div>
</div>
{% endif %}
{% if galleryVideos.getVideos() is defined and galleryVideos.getVideos()|length > 0 %}
<div class=\"story-teaser-img\">
<img src=\"/images/play-offer-story.svg\" alt=\"Истории\"/>
</div>
{% endif %}
{% if not offer.isHideNoveltyLabel() and offer.getRenewedOn().diff(date()).days <= constant('Slivki\\\\Services\\\\Category\\\\NewOfferCategoryService::NEW_OFFER_PERIOD_DAYS') %}
<div class=\"new-offer-watermark\">
Новая
</div>
{% endif %}
{% if offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().getDeliveryWorkingTime() is not null %}
{% set workingDeliveryTime = (offer.getOnlineOrderSettings().getDeliveryWorkingTime())|json_decode()[\"now\"|date(\"w\")] %}
{% set startTime = workingDeliveryTime.startTime|date('H:i') %}
{% set endTime = workingDeliveryTime.endTime|date('H:i') %}
{% set dayOff = workingDeliveryTime.dayOff %}
{% set nowTime = \"now\"|date(\"H:i\") %}
{% if startTime == endTime and not dayOff %}ы
<a href=\"{{ offerURL }}\" class=\"open-delivery-info d-none\" target=\"_blank\">ДОСТАВКА КРУГЛОСУТОЧНО</a>
{% endif %}
{% endif %}
<a href=\"{{ offerURL }}\" target=\"_blank\" class=\"details-link {{ teaserAnchorClass }}\">
{% if offer.getCaptionName()|trim %}
<div class=\"info-line\" style=\"background-color: {{ offer.getCaptionColor() }};\">
<div>{{ offer.getCaptionName() }}</div>
</div>
{% endif %}
{% if offer.getRegionalCaptionName()|trim %}
<div class=\"info-line regional\"
style=\"background-color: {{ offer.getRegionalCaptionColor() }}; display: none;\">
<div>{{ offer.getRegionalCaptionName() }}</div>
</div>
{% endif %}
</a>
{% if offer.getHint() and offer.getHint()|trim != '' %}
<div class=\"teaser-hint\">
<div class=\"teaser-hint-inner\">{{ offer.getHint()|raw }}</div>
</div>
{% endif %}
{% if showManicurePrice is defined and showManicurePrice and offer.getPrice() %}
<div class=\"info-line manicure-price\">
<div>Маникюр под ключ {{ offer.getPrice()|number_format(2, ',', '') }} руб</div>
</div>
{% endif %}
</div>
{% set supplierLogo = getTeaserWatermark(offer.getID()) %}
{% if supplierLogo|length > 0 %}
{% set supplierLogoWidth = supplierLogo.width ? supplierLogo.width : 65 %}
<div class=\"teaser--supplier-logo\">
<img style=\"{{ supplierLogo.width ? 'width:' ~ supplierLogo.width ~ 'px;' }}{{ supplierLogo.height ? 'height:' ~ supplierLogo.height ~ 'px;' }}\"
src=\"{{ getImageURL(supplierLogo.watermark, 2 * supplierLogoWidth, 0) }}\" alt=\"\"/>
</div>
{% endif %}
{% block favorite %}{% endblock %}
<div class=\"discount-label\">{{ offer.isWithoutCodes() ? 'пока без скидки' : offer.getDiscountLabelText() }}</div>
<div class=\"top\">
{% set rating = offer.getRating() %}
{% set ratingPercentage = rating * 100 / 5 %}
{% set ratingCount = getOfferCommentsCount(offer.getID()) %}
<div class=\"d-flex align-items-center\">
{% if ratingCount > 0 or rating > 0 %}
<div class=\"star-ratings-css\">
{% if rating > 0 %}
<div class=\"star-ratings-css-top\" style=\"width: {{ ratingPercentage }}%\">
<span>★</span>
</div>
{% else %}
<div class=\"star-ratings-css-bottom\">
<span>★</span>
</div>
{% endif %}
</div>
<div class=\"rating-value\" style=\"margin-right: 2px;\">{{ rating|round(2, 'ceil') }}</div>
<div class=\"rating-value\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title=\"Количество комментариев к данной акции\">
({{ getOfferCommentsCount(offer.getID()) }})
</div>
{% endif %}
</div>
{% if offer.getGeoLocations().count() > 0 %}
<div class=\"geo-location-block\">
<div class=\"distance\" data-toggle=\"distance-tooltip\" data-placement=\"top\"
data-original-title=\"Расстояние от Вас до объекта\">
<i class=\"slivki-icon slivki-icon-direction\"></i>
<img class='ajaxLoader' src='/images/ajax-loader-16x16.gif' alt='Загрузка...'/>
<span></span>
</div>
{% include 'Slivki/offers/geo_location_data.html.twig' with {'offer': offer} only %}
</div>
{% endif %}
</div>
<div class=\"teaser-same-height\">
<div class=\"title\">
<a href=\"{{ offerURL }}\" target=\"_blank\" class=\"details-link \"
style=\"color: {{ offer.getTitleFontColor() }};\">{{ offer.getTitle()|raw }}</a>
</div>
</div>
<a class=\"details-link marketActionLink\" href=\"{{ offerURL }}\" target=\"_blank\">
<div class=\"address\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title=\"Ориентир\">{{ offer.getAddress() }}</div>
</a>
<div class=\"bottom d-flex font-size-0680\">
{% set daysLeft = offer.getActiveTill().diff(date()).days %}
{% if not offer.isWithoutCodes() %}
<a href=\"{{ offerURL }}\" target=\"_blank\" class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Взято кодов за {{ daysFromStrart }} {{ ['день', 'дня', 'дней']|plural(daysFromStrart) }}'>
<i class=\"slivki-icon slivki-icon-users\"></i>
<span>{{ getOfferMonthlyPurchaseCount(offer.getID()) }}</span>
</a>
{% endif %}
<div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Просмотров за {{ daysFromStrart }} {{ ['день', 'дня', 'дней']|plural(daysFromStrart) }}'>
<i class=\"slivki-icon slivki-icon-eye\"></i>
<span>{{ getOfferVisitCount(offer) }}</span>
</div>
{% if not offer.isInFreeCodesCategory() and not offer.isWithoutCodes() %}
<div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Кол-во продаж к кол-ву просмотров. <br> Конверсия за {{ daysFromStrart }} {{ ['день', 'дня', 'дней']|plural(daysFromStrart) }}'>
<img src=\"/images/stats-alt-2.svg\" style=\"margin: 0 .2em;\"/>
<span>{{ getOfferConversion(offer.getID()) }}%</span>
</div>
{% endif %}
{% if offer.getActiveSince() <= date() and offer.getActiveTill() >= date() and not offer.isWithoutCodes() %}
<div class=\"bottom-item\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Дней до окончания действия акции'>
<i class=\"slivki-icon slivki-icon-clock\"></i>
<span class=\"daystr\">{{ daysLeft == 0 ? 0.5 : daysLeft }} {{ daysLeft > 0 ? ['день', 'дня', 'дней']|plural(daysLeft) : 'дня' }}</span>
</div>
{% endif %}
</div>
<div class=\"w-100 d-flex\">
{% if offer.isOneOfOnlineOrderAllowedOnSite() and not offer.isTireOnlineOrderAllowedOnSite() %}
<a href=\"{{ offer.getID() in constant('Slivki\\\\Entity\\\\Offer::FREESTYLE_OFFER_IDS') ? getLinkGiftCertificateOnlineOrderByOnlyCode(offer) : getLinkOnlineOrder(offer) }}\"
class=\"top-code-online-order\">Онлайн-заказ</a>
{% elseif offer.isTireOnlineOrderAllowedOnSite() %}
<a href=\"/online-zapis/{{ offer.getID() }}\" class=\"top-code-online-order\">Онлайн-запись</a>
{% endif %}
{% if offer.isInFreeCodesCategory() %}
<div class=\"top-code\" data-toggle=\"tooltip\" data-placement=\"top\"
data-original-title='Код скидки предоставляется сайтом бесплатно'>Код 0 руб.
</div>
{% endif %}
{% if offer.getDeliveryTimeTeaser() %}
<div class=\"time-delivery d-flex justify-content-center align-items-center\">
<img width=\"22\" height=\"17\" class=\"mr-1\" src=\"/images/icon_avto.svg\"/>
<span class=\"color-white\">{{ offer.getDeliveryTimeTeaser() }} мин</span>
</div>
{% endif %}
</div>
{% if offer.getOnlineOrderSettings() is not null and offer.getOnlineOrderSettings().getDeliveryWorkingTime() is not null %}
{% set workingDeliveryTime = (offer.getOnlineOrderSettings().getDeliveryWorkingTime())|json_decode()[\"now\"|date(\"w\")] %}
{% set startTime = workingDeliveryTime.startTime|date('H:i') %}
{% set endTime = workingDeliveryTime.endTime|date('H:i') %}
{% set dayOff = workingDeliveryTime.dayOff %}
{% set nowTime = \"now\"|date(\"H:i\") %}
{% if nowTime >= startTime and nowTime <= endTime and not dayOff %}
<p class=\"teaser-working-time-delivery open-delivery d-none\">Доставка до {{ workingDeliveryTime.endTime }}</p>
{% elseif nowTime < startTime and startTime != endTime and not dayOff %}
<p class=\"teaser-working-time-delivery closed-delivery d-none\">Закрыто. Доставка с {{ workingDeliveryTime.startTime }}</p>
{% elseif startTime == endTime and not dayOff %}
<p class=\"teaser-working-time-delivery open-delivery d-none\">Доставка круглосуточно</p>
{% elseif dayOff %}
<p class=\"teaser-working-time-delivery closed-delivery d-none\">Предзаказ</p>
{% endif %}
{% endif %}
</div>", "Slivki/offers/teaser.html.twig", "/mnt/data/virtwww/slivki/templates/Slivki/offers/teaser.html.twig");
}
}