Commit fd0b3782 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавили условие для вывода формы

parent a28cebc7
......@@ -6,10 +6,13 @@ use yii\web\JsExpression;
use common\modules\bids\models\Bid;
$userIsSubscribed = false;
$cacheEmail = Yii::$app->cache->get('user_email');
if ($cacheEmail!==false && Bid::find()->where(['email' => $cacheEmail])->exists()===true)
$userIsSubscribed = true;
?>
<?php if ($userIsSubscribed===true): ?>
<div class="subsc_blog">
<h2 class="subsc_blog_title"><?php var_dump($cacheEmail); ?><?=\Yii::t('form', 'Liked? Subscribe up for updates!')?></h2>
<h2 class="subsc_blog_title"><?=\Yii::t('form', 'Liked? Subscribe up for updates!')?></h2>
<div class="subsc_blog_txt"><?=\Yii::t('form', 'We will try to publish this section only useful and unique content for the market. Subscription allow to be the first to get notification about fresh articles.')?></div>
<?php
......@@ -58,4 +61,5 @@ $cacheEmail = Yii::$app->cache->get('user_email');
form.parent('div').fadeOut(500);
}, 1500);
});
</script>
\ No newline at end of file
</script>
<?php endif; ?>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment