Blame view

src/app/frontend/views/partial/item_group.php 4.4 KB
b3e3a49d   Dima   new link in open all
1
  <div class="one_item float <?= ( ($k+1) % $limit == 0 ? 'last' : '' ) ?>" id="item_<?=$k?>">
49bb9727   Alex Savenko   fix
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  
      <?php
          /*
              <div class="new_top">
                  <?= ( isset( $i['is_new'] ) && !empty( $i['is_new'] )
                  ?
                  '<div class="float">
                      <img src="/images/new.png" alt="Новинки" width="47" height="14" />
                  </div>'
                  :
                  '').
                  ( isset( $i['is_top'] ) && !empty( $i['is_top'] )
                  ?
                  '<div class="float">
                      <img src="/images/top.png" alt="Топ продаж" width="63" height="14" />
                  </div>'
                  :
                  '') ?>
              </div>
          */
      ?>
  
dce46e80   Alex Savenko   first push project
24
25
26
27
28
29
30
31
32
      <div class="one_item_image">
          <a href="<?= $this->seoUrl->setUrl($i['alias']) ?>" title="<?= $i['title'] ?>" style="position:relative;">
              <?php if($i['count_available'] == 0){
                  echo "<div class='not_availiable ".$t->_("lang_name")."'></div>";
              }
              ?>
              <img src="<?= $i['cover'] ?>" alt="<?= $i['title'] ?>" width="126" height="200" />
          </a>
      </div>
49bb9727   Alex Savenko   fix
33
  
dce46e80   Alex Savenko   first push project
34
35
      <div class="one_item_title">
          <a href="<?= $this->seoUrl->setUrl($i['alias']) ?>" title="<?= $i['title'] ?>">
9484bc69   Dima   Test SEO
36
37
              <span class="h3">
                  <?php if($i['catalog'] == 337 && $lang_id == 2){?>
3457298d   Dima   Test SEO
38
39
40
41
                      Семена кукурузы
                  <?php }elseif($i['catalog'] == 337 && $lang_id == 1){?>
                      Насіння кукурудзи
                  <?php } ?>
9484bc69   Dima   Test SEO
42
43
44
45
46
47
48
                  <?php if($i['catalog'] == 518 && $lang_id == 2){?>
                      Картофель
                  <?php }elseif($i['catalog'] == 518 && $lang_id == 1){?>
                      Картопля
                  <?php } ?>
                  <?= \plugins::getShortText($i['title']) ?>
              </span>
dce46e80   Alex Savenko   first push project
49
50
          </a>
      </div>
49bb9727   Alex Savenko   fix
51
  
dce46e80   Alex Savenko   first push project
52
      <div class="align_bottom">
49bb9727   Alex Savenko   fix
53
  
3c0a3477   Alex Savenko   add/edit
54
          <div class="one_item_price">
3457298d   Dima   Test SEO
55
56
              <?php
              //echo "<pre>".print_r($i)."</pre>";
9484bc69   Dima   Test SEO
57
              if($i['catalog'] == 337 || $i['catalog'] == 518):
3457298d   Dima   Test SEO
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
                  //experement
                  ?>
                  <div class="all_old_price">
                      <?php
                      for($k=0;$k<1;$k++){ ?>
                          <div class="old_price <?=date('Y')?>_<?=rand(1,12)?>_<?=rand(1,28)?>">
                              <?= $t->_("price_from") ?>
                              <?php
                              $pr = $i['price'];
                              if(rand(1,2) == 1)
                                  $pr -= rand(20,120)/100;
                              else
                                  $pr += rand(20,120)/100;
                              echo '<span>'.$pr.'</span> грн';
                              ?>
                          </div>
                      <?php } ?>
                  </div>
              <?php             //experement
              endif;
              ?>            <?= $t->_("price_from") ?>
398c9471   Alex Savenko   price display
79
              <?php
49bb9727   Alex Savenko   fix
80
81
                  //discount
                  if (!empty($discount)) {
f37db764   Alex Savenko   test
82
                      if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) {
49bb9727   Alex Savenko   fix
83
84
85
86
87
88
                          echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';
                          echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн';
                      }
                      else {
                          echo '<span>'.$i['price'].'</span> грн';
                      }
2c9e2e22   Alex Savenko   item_group view
89
90
91
92
                  }
                  else {
                      echo '<span>'.$i['price'].'</span> грн';
                  }
3c0a3477   Alex Savenko   add/edit
93
              ?>
3c0a3477   Alex Savenko   add/edit
94
          </div>
49bb9727   Alex Savenko   fix
95
  
dce46e80   Alex Savenko   first push project
96
97
98
99
          <div class="one_item_buttons">
              <a href="<?= $this->seoUrl->setUrl($i['alias']) ?>" title="" class="btn grey"><?= $t->_("details") ?></a>
              <a data-group_id="<?= $i['group_id'] ?>" href="javascript:;" title="" class="<?= $i['count_available'] != 0 ? 'btn green buy' : 'not_available grey'?>"><?= $t->_("buy") ?></a>
          </div>
49bb9727   Alex Savenko   fix
100
  
dce46e80   Alex Savenko   first push project
101
102
          <div class="one_item_compare">
              <input type="checkbox" id="items_compare_item_<?= $i['id'] ?>" value="<?= $i['type_id'].'-'.$i['catalog'].'-'.$i['id'] ?>" <?= ( !empty($i['checked']) ? 'checked' : '' ) ?> />
3a153125   Alex Savenko   test
103
              <label for="items_compare_item_<?= $i['id'] ?>"><span></span><?= $t->_("compared_to") ?></label>
dce46e80   Alex Savenko   first push project
104
          </div>
49bb9727   Alex Savenko   fix
105
  
dce46e80   Alex Savenko   first push project
106
      </div>
49bb9727   Alex Savenko   fix
107
  
dce46e80   Alex Savenko   first push project
108
  </div>