share.php 2.21 KB
<?php
use yii\helpers\Url;
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\Breadcrumbs;

$this->title = 'Мои закладки';
$this->registerMetaTag(['name' => 'description', 'content' => 'Мои закладки']);
$this->registerMetaTag(['name' => 'keywords', 'content' => 'Мои закладки']);

$this->registerJs("

    $('.orders_view').hide();
    $('.fav_point .link').click(function(){
        $(this).parent().parent().find('.orders_view').toggle();
        return false;
    });

", View::POS_READY, 'orders_view');
?>
<nav class="bread-crumbs">
	<?= Breadcrumbs::widget([
		'links' => ['Мой кабинет'],
	]) ?>
	<div class="both"></div>
</nav>
<div class="lay_title">
	<h1 class="uppercase center">Мои закладки</h1>
</div>
<div class="layout">
	<div class="leftbar">
		<div class="mycabinet">
			<div class="begin">Мой кабинет</div>
			<?= $this->render('_tabs')?>
		</div>
	</div>

	<div class="content">
		<div class="favorites">
			<div style="margin-top:-5px;">
				<?php $i=0; foreach($items as $date=>$_items): $i++;?>
					<div class="fav_point">
						<div class="left"><a href="#" class="link"><?=$i?></a></div>
						<div class="left"><?= $date?></div>
						<div class="both"></div>

						<div class="orders_view">
							<?foreach($_items as $item_p):if(!empty($item_p->product)):?>

								<div class="order">
									<div><a href="<?=Url::to(['iam/share','deleteID'=>$item_p->id])?>" class="delete_button"></a></div>
									<div class="pixbox"><a href="<?=Url::to(['catalog/product', 'product' => $item_p->product])?>">
											<?= \common\components\artboximage\ArtboxImageHelper::getImage($item_p->product->imageUrl, 'iam')?>
									</div>
									<div class="order_title"><a href="<?=Url::to(['catalog/product', 'product' => $item_p->product])?>" class="name"><?=$item_p->product->name?></a></div>
									<?if(!empty($item_p->product->variants[0])):?><div class="order_price"><span><?=$item_p->product->variants[0]->price?></span> грн.</div><?endif;?>
									<p class="note"></p>
								</div>
							<?endif;endforeach;?>
							<div class="both"></div>
						</div>
					</div>
				<?endforeach;?>
			</div>
		</div>
	</div>
	<div class="both"></div>
</div>