Commit 90014ee3e098e3f36fe1a2db74e81b424c8064b6

Authored by Administrator
1 parent 219b20e9

big commti

Showing 1 changed file with 10 additions and 2 deletions   Show diff stats
frontend/views/catalog/product.php
... ... @@ -109,7 +109,15 @@ FlipclockAsset::register($this);
109 109 </td>
110 110 <td>
111 111 <!-- Купить -->
112   - <a lang="5892" class="btn btnBuy buy_button btn-large1" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm">Купить</a>
  112 + <?php if($product->variant->stock > 0 && $product->variant->status != 1){?>
  113 + <a lang="5892" class="btn btnBuy buy_button btn-large1" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm">Купить</a>
  114 + <?php }else if($product->variant->status == 1){?>
  115 + <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>
  116 + <?}
  117 + else {?>
  118 + <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>
  119 + <?php }?>
  120 +
113 121 </td>
114 122 <td>
115 123 <?php
... ... @@ -372,7 +380,7 @@ FlipclockAsset::register($this);
372 380 <tr>
373 381 <td>
374 382 <?php
375   - if($product->variant->price > 0 && $product->variant->stock > 0) {
  383 + if($product->variant->stock > 0 && $product->variant->status != 1) {
376 384 ?>
377 385 <div class="fast_order_form">
378 386 <div class="error_text"></div>
... ...