new_arrivalsSuccess.php 3.59 KB
Newer Older
Яков's avatar
first  
Яков committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<div class="er_rows" style="padding-bottom: 0;">
    <div class="breadcrumbs">
        <div class="breadcrumbs">
            <span><a href="/" title="Главная">Главная</a>&nbsp;/&nbsp;</span><!--
         --><span><a href="<?php echo url_for('@catalog') ?>">Каталог</a></span><!--
         --><span>&nbsp;/&nbsp;Новые поступления</span>

        </div>
    <h1>Новые поступления</h1>
    <style type="text/css">
        .er_content__main__search{display: block;}
        .js_cat_view__ct__tr td {
            height: 63px;
        }
    </style>
    </div>
</div>

<div style="position:absolute;right:20px;margin-top:-30px;">
    Отображать
    <select onchange="$.cookie('js_cat_view', $(this).val());js_cat.init();" style="display:inline-block;width:100px;" class="small_select">
        <option value="div">блоками</option>
        <option value="tr" selected="selected">списком</option>
    </select>
</div>
<i class="br20"></i>


<table class="std_table js_cat_view" cellspacing="0" cellpadding="0">
    <thead>
    <tr valign="bottom" align="left">
        <th colspan="2" width="100%">Название</th>
        <th>Код</th>
        <th>Цена</th>
        <th>Мин.&nbsp;п</th>
        <th>В&nbsp;наличии</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
    </tr>
    </thead>

    <tbody>
    <?php

    $productsIdsInBasket = $this->context->getUser()->getProductsIdsInBasket();

    foreach ($products as $product)
    {
        echo "<tr class='js_cat_view__ct__tr'>";
            echo "<td style='position: relative'>";
                echo '<img class="js_cat_view__img image_view" src="' . url_for('@get_image?id=' . $product['id']) . '?small">';
            echo "</td>";
            echo "<td>";
                echo "<a href='" . url_for('@catalog_show_prod?prod_id=' . $product['id']) . "'>" . $product['title'] . "</a>";
            echo "</td>";
            echo "<td>";
                echo $product['product_code'];
            echo "</td>";
            echo "<td><b>";
                if ($product['price'])
                {
                    echo $product['price'] . '<span class="rub_b" style="position:relative;top:0px;">a</span>';
                }
            echo "</b></td>";
            echo "<td>";
                echo $product['min_order'];
            echo "</td>";
            echo "<td>";
                echo round($product['stockCount']);
            echo "</td>";
            ?>

            <td>
                <ul class="counter" data-product-id="<?php echo $product['id'] ?>">
                    <li onclick="basket.remove($(this))"  class="btn_all counter__button counter_button_minus red_button2"></li>
                    <li class="counter__num">
                        <?php

                        $value = 0;
                        if (key_exists($product['id'], $productsIdsInBasket))
                        {
                            $value = $productsIdsInBasket[$product['id']];
                        }

                        ?>
                        <input data-min-p="<?php echo $product['min_order'] ?>" data-stock="<?php echo round($product['stockCount']); ?>" onchange="basket.handWrite($(this));basket.check($(this))" name="" value="<?php echo $value ?>" autocomplete="off" type="text">
                    </li>
                    <li onclick="basket.add($(this))" class="btn_all counter__button counter_button_plus green_button2"></li>
                </ul>
            </td>
            <td></td>

            <?php
        echo "</tr>";
    }

    ?>
    </tbody>


</table>

<i class="br20"></i>