Commit 2e9ea16eb637c3361f955ce283a061c0e836c2e9
1 parent
10e0f427
-
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
frontend/views/catalog/product.php
... | ... | @@ -154,10 +154,14 @@ $this->registerJs (" |
154 | 154 | <?= $product->description ?> |
155 | 155 | </div> |
156 | 156 | </li> |
157 | - <?php if(!empty($product->video)) :?> | |
157 | + <?php if(!empty($product->video) && strpos($product->video, '.jpg') === FALSE && strpos($product->video, '.png') === FALSE) :?> | |
158 | 158 | <li><a href="#">Видео</a> |
159 | 159 | <div class="info product-thumb-video"> |
160 | - <?= strpos($product->video, '<iframe') !== FALSE || strpos($product->video, '<object') !== FALSE ? $product->video : \cics\widgets\VideoEmbed::widget(['responsive' => false, 'url' => $product->video]); ?> | |
160 | + <?php if (strpos($product->video, '<iframe') !== FALSE || strpos($product->video, '<object') !== FALSE) :?> | |
161 | + <?= $product->video?> | |
162 | + <?php else :?> | |
163 | + <?= \cics\widgets\VideoEmbed::widget(['responsive' => false, 'url' => $product->video]) ?> | |
164 | + <?php endif?> | |
161 | 165 | </div> |
162 | 166 | </li> |
163 | 167 | <?php endif?> | ... | ... |