Commit ea42de8bb687c5ee3ae31ff9d800ccad38966f03

Authored by andryeyev
1 parent 7a508b62

+ ratingValue тупо 5

Showing 1 changed file with 18 additions and 24 deletions   Show diff stats
templates/catalogs_product-list.tpl
... ... @@ -4,6 +4,7 @@
4 4 <div class="wrp">
5 5 <form method="get" action="{$smarty.const.URL}{$lang_prefix}{if $smarty.get.rubID}{$smarty.request.rubID}-{/if}catalogs/">
6 6 <table cellpadding="4" cellspacing="0" border="0" width="100%">
  7 + {if (is_array($brends) and count($brends)>0)}
7 8 <tr>
8 9 <td><span>{$smarty.const.FILTER_LABEL_1}</span></td>
9 10 </tr>
... ... @@ -41,32 +42,22 @@
41 42 <tr>
42 43 <td></td>
43 44 </tr>
44   - {if ($rubric.parent_id>0 OR $product.rubric_id>0) and is_array($sex) and count($sex)>0}
  45 + {/if}
  46 + {if (is_array($sex) and count($sex)>0)}
45 47 <tr>
46 48 <td><span>{$smarty.const.FILTER_LABEL_2}</span></td>
47 49 </tr>
48   - {*
49   - <tr>
50   - <td>
51   - <select name="sex" onChange="document.location='{$smarty.const.URL}{$lang_prefix}{if $smarty.request.rubID}{$smarty.request.rubID}-{/if}catalogs/filter{if $smarty.get.search_str}search_str={$smarty.get.search_str}{/if}{if $smarty.get.brend};brend={$smarty.get.brend}{/if}{if $smarty.get.what};what=all{/if};sex='+this.value+'{if $smarty.get.filter};filter={$smarty.request.filter}{/if}';">
52   - <option value="">Âñå</option>
53   - {section name=i loop=$sex}
54   - <option value="{$sex[i].link}" {if $smarty.get.sex eq $sex[i].link}selected{/if}>{$sex[i].name_ukr}</option>
55   - {/section}
56   - </select>
57   - </td>
58   - </tr>
59   - *}
60 50 <tr>
61 51 <td>
62 52 <table cellpadding="2" cellspacing="0">
63 53 <tr>
64   - {section name=i loop=$sex}{if $sex[i].name}
65   - <tr>
66   - <td><input type="checkbox" onClick="document.location='{$smarty.const.URL}{$lang_prefix}{url4_sex s=$sex[i].link}'" value="{$sex[i].link}" {issex s=$sex[i].link} /></td>
67   - <td><a href="{$smarty.const.URL}{$lang_prefix}{url4_sex s=$sex[i].link}">{$sex[i].name}</a></td>
68   - </tr>
69   - {/if}
  54 + {section name=i loop=$sex}
  55 + {if $sex[i].name}
  56 + <tr>
  57 + <td><input type="checkbox" onClick="document.location='{$smarty.const.URL}{$lang_prefix}{url4_sex s=$sex[i].link}'" value="{$sex[i].link}" {issex s=$sex[i].link} /></td>
  58 + <td><a href="{$smarty.const.URL}{$lang_prefix}{url4_sex s=$sex[i].link}">{$sex[i].name}</a></td>
  59 + </tr>
  60 + {/if}
70 61 {/section}
71 62 </table>
72 63 </td>
... ... @@ -75,7 +66,7 @@
75 66 <td></td>
76 67 </tr>
77 68 {/if}
78   - {if is_array($filters)}
  69 + {if is_array($filters) and count($filters)>0}
79 70 <tr>
80 71 <td><span>{if $rubric.filter}{$rubric.filter}{else}{$smarty.const.FILTER_LABEL_3}{/if}</span></td>
81 72 </tr>
... ... @@ -96,7 +87,7 @@
96 87 <td></td>
97 88 </tr>
98 89 {/if}
99   - {if is_array($filters2)}
  90 + {if is_array($filters2) and count($filters2)>0}
100 91 <tr>
101 92 <td><span>{if $rubric.filter2}{$rubric.filter2}{else}{$smarty.const.FILTER_LABEL_3} 2{/if}</span></td>
102 93 </tr>
... ... @@ -117,7 +108,7 @@
117 108 <td></td>
118 109 </tr>
119 110 {/if}
120   - {if is_array($rost)}
  111 + {if is_array($rost) and count($rost)>0}
121 112 <tr>
122 113 <td><span>{if $rubric.id eq 14032}{$smarty.const.FILTER_LABEL_4}{elseif $rubric.id eq 14065}{$smarty.const.FILTER_LABEL_14065}{else}{$smarty.const.FILTER_LABEL_5}{/if}</span></td>
123 114 </tr>
... ... @@ -141,7 +132,7 @@
141 132 <td></td>
142 133 </tr>
143 134 {/if}
144   - {if is_array($size)}
  135 + {if is_array($size) and count($size)>0}
145 136 <tr>
146 137 <td><span>{if $rubric.id eq 14032}{$smarty.const.FILTER_LABEL_6}{else}{$smarty.const.FILTER_LABEL_7}{/if}</span></td>
147 138 </tr>
... ... @@ -166,7 +157,7 @@
166 157 <td></td>
167 158 </tr>
168 159 {/if}
169   - {if is_array($years)}
  160 + {if is_array($years) and count($years)>0}
170 161 <tr>
171 162 <td><span>{$smarty.const.FILTER_LABEL_8}</span></td>
172 163 </tr>
... ... @@ -275,6 +266,9 @@
275 266 }
276 267  
277 268 $rating = round ($rating / $votes, 1);
  269 +
  270 + // ñêàçàëè òóïî ïîñòàâèòü 5
  271 + $rating = 5;
278 272  
279 273 {/php}
280 274  
... ...