Commit 9645ead8e4c8486c321976cc7900821d31fd6570
1 parent
d00e5a55
big commti
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
frontend/views/catalog/product.php
@@ -307,9 +307,12 @@ FlipclockAsset::register($this); | @@ -307,9 +307,12 @@ FlipclockAsset::register($this); | ||
307 | </div> | 307 | </div> |
308 | 308 | ||
309 | <div class="buy_button"> | 309 | <div class="buy_button"> |
310 | - <?php if($product->variant->stock > 0){?> | 310 | + <?php if($product->variant->stock > 0 && $product->variant->status != 1){?> |
311 | <a href="#" class="btn btn-large buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="5892">Купить</a> | 311 | <a href="#" class="btn btn-large buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="5892">Купить</a> |
312 | - <?php } else {?> | 312 | + <?php }else if($product->variant->status == 1){?> |
313 | + <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2)" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >снят с производства</a> | ||
314 | + <?} | ||
315 | + else {?> | ||
313 | <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2)" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >Под заказ</a> | 316 | <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2)" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >Под заказ</a> |
314 | <?php }?> | 317 | <?php }?> |
315 | 318 | ||
@@ -327,7 +330,7 @@ FlipclockAsset::register($this); | @@ -327,7 +330,7 @@ FlipclockAsset::register($this); | ||
327 | </div> | 330 | </div> |
328 | <div class="clearfix"></div> | 331 | <div class="clearfix"></div> |
329 | </div> | 332 | </div> |
330 | - <?php if($product->variant->stock > 0){?> | 333 | + <?php if($product->variant->stock > 0 && $product->variant->status != 1){?> |
331 | <div class="follow_price"> | 334 | <div class="follow_price"> |
332 | <a href="#" data-toggle="modal" data-target="#where_buy">где купить?</a> | 335 | <a href="#" data-toggle="modal" data-target="#where_buy">где купить?</a> |
333 | </div> | 336 | </div> |