Commit ea42de8bb687c5ee3ae31ff9d800ccad38966f03
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,6 +4,7 @@ | ||
4 | <div class="wrp"> | 4 | <div class="wrp"> |
5 | <form method="get" action="{$smarty.const.URL}{$lang_prefix}{if $smarty.get.rubID}{$smarty.request.rubID}-{/if}catalogs/"> | 5 | <form method="get" action="{$smarty.const.URL}{$lang_prefix}{if $smarty.get.rubID}{$smarty.request.rubID}-{/if}catalogs/"> |
6 | <table cellpadding="4" cellspacing="0" border="0" width="100%"> | 6 | <table cellpadding="4" cellspacing="0" border="0" width="100%"> |
7 | + {if (is_array($brends) and count($brends)>0)} | ||
7 | <tr> | 8 | <tr> |
8 | <td><span>{$smarty.const.FILTER_LABEL_1}</span></td> | 9 | <td><span>{$smarty.const.FILTER_LABEL_1}</span></td> |
9 | </tr> | 10 | </tr> |
@@ -41,32 +42,22 @@ | @@ -41,32 +42,22 @@ | ||
41 | <tr> | 42 | <tr> |
42 | <td></td> | 43 | <td></td> |
43 | </tr> | 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 | <tr> | 47 | <tr> |
46 | <td><span>{$smarty.const.FILTER_LABEL_2}</span></td> | 48 | <td><span>{$smarty.const.FILTER_LABEL_2}</span></td> |
47 | </tr> | 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 | <tr> | 50 | <tr> |
61 | <td> | 51 | <td> |
62 | <table cellpadding="2" cellspacing="0"> | 52 | <table cellpadding="2" cellspacing="0"> |
63 | <tr> | 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 | {/section} | 61 | {/section} |
71 | </table> | 62 | </table> |
72 | </td> | 63 | </td> |
@@ -75,7 +66,7 @@ | @@ -75,7 +66,7 @@ | ||
75 | <td></td> | 66 | <td></td> |
76 | </tr> | 67 | </tr> |
77 | {/if} | 68 | {/if} |
78 | - {if is_array($filters)} | 69 | + {if is_array($filters) and count($filters)>0} |
79 | <tr> | 70 | <tr> |
80 | <td><span>{if $rubric.filter}{$rubric.filter}{else}{$smarty.const.FILTER_LABEL_3}{/if}</span></td> | 71 | <td><span>{if $rubric.filter}{$rubric.filter}{else}{$smarty.const.FILTER_LABEL_3}{/if}</span></td> |
81 | </tr> | 72 | </tr> |
@@ -96,7 +87,7 @@ | @@ -96,7 +87,7 @@ | ||
96 | <td></td> | 87 | <td></td> |
97 | </tr> | 88 | </tr> |
98 | {/if} | 89 | {/if} |
99 | - {if is_array($filters2)} | 90 | + {if is_array($filters2) and count($filters2)>0} |
100 | <tr> | 91 | <tr> |
101 | <td><span>{if $rubric.filter2}{$rubric.filter2}{else}{$smarty.const.FILTER_LABEL_3} 2{/if}</span></td> | 92 | <td><span>{if $rubric.filter2}{$rubric.filter2}{else}{$smarty.const.FILTER_LABEL_3} 2{/if}</span></td> |
102 | </tr> | 93 | </tr> |
@@ -117,7 +108,7 @@ | @@ -117,7 +108,7 @@ | ||
117 | <td></td> | 108 | <td></td> |
118 | </tr> | 109 | </tr> |
119 | {/if} | 110 | {/if} |
120 | - {if is_array($rost)} | 111 | + {if is_array($rost) and count($rost)>0} |
121 | <tr> | 112 | <tr> |
122 | <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> | 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 | </tr> | 114 | </tr> |
@@ -141,7 +132,7 @@ | @@ -141,7 +132,7 @@ | ||
141 | <td></td> | 132 | <td></td> |
142 | </tr> | 133 | </tr> |
143 | {/if} | 134 | {/if} |
144 | - {if is_array($size)} | 135 | + {if is_array($size) and count($size)>0} |
145 | <tr> | 136 | <tr> |
146 | <td><span>{if $rubric.id eq 14032}{$smarty.const.FILTER_LABEL_6}{else}{$smarty.const.FILTER_LABEL_7}{/if}</span></td> | 137 | <td><span>{if $rubric.id eq 14032}{$smarty.const.FILTER_LABEL_6}{else}{$smarty.const.FILTER_LABEL_7}{/if}</span></td> |
147 | </tr> | 138 | </tr> |
@@ -166,7 +157,7 @@ | @@ -166,7 +157,7 @@ | ||
166 | <td></td> | 157 | <td></td> |
167 | </tr> | 158 | </tr> |
168 | {/if} | 159 | {/if} |
169 | - {if is_array($years)} | 160 | + {if is_array($years) and count($years)>0} |
170 | <tr> | 161 | <tr> |
171 | <td><span>{$smarty.const.FILTER_LABEL_8}</span></td> | 162 | <td><span>{$smarty.const.FILTER_LABEL_8}</span></td> |
172 | </tr> | 163 | </tr> |
@@ -275,6 +266,9 @@ | @@ -275,6 +266,9 @@ | ||
275 | } | 266 | } |
276 | 267 | ||
277 | $rating = round ($rating / $votes, 1); | 268 | $rating = round ($rating / $votes, 1); |
269 | + | ||
270 | + // ñêàçàëè òóïî ïîñòàâèòü 5 | ||
271 | + $rating = 5; | ||
278 | 272 | ||
279 | {/php} | 273 | {/php} |
280 | 274 |