Commit af7fb26a421ef8b5162350f287ca20631173eedc

Authored by Administrator
1 parent b572566f

20.07.16

frontend/views/catalog/product.php
@@ -105,13 +105,7 @@ @@ -105,13 +105,7 @@
105 }); 105 });
106 ", View::POS_READY, 'Shadowbox'); 106 ", View::POS_READY, 'Shadowbox');
107 ?> 107 ?>
108 -  
109 -<!-- <nav class="bread-crumbs">-->  
110 -<!-- --><?//= Breadcrumbs::widget([  
111 -// 'links' => $this->params[ 'breadcrumbs' ],  
112 -// ]) ?>  
113 -<!-- <div class="both"></div>-->  
114 -<!-- </nav>--> 108 +
115 <?php if($flash = Yii::$app->session->getFlash('success')): ?> 109 <?php if($flash = Yii::$app->session->getFlash('success')): ?>
116 <div class="alert-success"><?= $flash ?></div> 110 <div class="alert-success"><?= $flash ?></div>
117 <?php endif; ?> 111 <?php endif; ?>
@@ -148,8 +142,8 @@ @@ -148,8 +142,8 @@
148 <span id='color'></span></div> 142 <span id='color'></span></div>
149 <div class="product_read_price"> 143 <div class="product_read_price">
150 <div class="w"> 144 <div class="w">
151 - <strike><span itemprop="price"><span id='old_cost'>0</span></span> грн.</strike>  
152 - <span class="cost"><span itemprop="price"><span id='cost'>0</span></span> <span class="valute">грн.</span></span> 145 + <strike><span itemprop="price"><span id='old_cost'><?= $variant->price_old ?></span></span> грн.</strike>
  146 + <span class="cost"><span itemprop="price"><span id='cost'><?= $variant->price ?></span></span> <span class="valute">грн.</span></span>
153 <meta itemprop="priceCurrency" content="UAH"> 147 <meta itemprop="priceCurrency" content="UAH">
154 </div> 148 </div>
155 <input type='hidden' id='product_id'/> 149 <input type='hidden' id='product_id'/>
frontend/views/catalog/product_item.php
@@ -73,13 +73,15 @@ @@ -73,13 +73,15 @@
73 <?php 73 <?php
74 74
75 echo '<div class="cost-block" itemprop="offers" itemscope itemtype="http://schema.org/Offer">'; 75 echo '<div class="cost-block" itemprop="offers" itemscope itemtype="http://schema.org/Offer">';
76 - echo '<p itemprop="price" class="cost">'; 76 +
77 // есть скидка 77 // есть скидка
  78 + echo '<p class="cost">';
78 if($product->enabledVariants[ 0 ]->price_old != 0 && $product->enabledVariants[ 0 ]->price_old != $product->enabledVariants[ 0 ]->price) { 79 if($product->enabledVariants[ 0 ]->price_old != 0 && $product->enabledVariants[ 0 ]->price_old != $product->enabledVariants[ 0 ]->price) {
79 - echo '<strike><span id=\'old_cost\' itemprop="price">' . $product->enabledVariants[ 0 ]->price_old . '</span> грн.</strike>&nbsp;'; 80 + echo '<strike><span id=\'old_cost\' itemprop="price">' . $product->enabledVariants[0]->price_old . '</span> грн.</strike>&nbsp;';
  81 + echo $product->enabledVariants[0]->price . ' <span>грн.</span></p>';
  82 + } else {
  83 + echo '<span itemprop="price">'.$product->enabledVariants[0]->price . ' </span><span>грн.</span></p>';
80 } 84 }
81 -  
82 - echo $product->enabledVariants[ 0 ]->price . ' <span>грн.</span></p>';  
83 echo '<meta itemprop="priceCurrency" content = "UAH">'; 85 echo '<meta itemprop="priceCurrency" content = "UAH">';
84 echo '</div>'; 86 echo '</div>';
85 87