Commit 4e8af0eb81274bfe2e1dc4ce9167f53dc78f1b39

Authored by Alex Savenko
1 parent 15f3892a

ru version of discounted search

Showing 1 changed file with 12 additions and 2 deletions   Show diff stats
www/js/main_ru.js
... ... @@ -2029,8 +2029,18 @@ $(document).ready(function()
2029 2029 html +=
2030 2030 '<li class="clearfix">'+
2031 2031 '<a href="'+data[i]['alias']+'" title=""><img src="'+data[i]['cover']+'" height="100" alt="'+data[i]['title']+'" /></a>'+
2032   - '<a href="'+data[i]['alias']+'" class="search_result_title" title="'+data[i]['title']+'">'+data[i]['title']+'</a>'+
2033   - '<p class="search_result_price">цена от <span class="price">'+data[i]['price2']+'</span> грн</p>'+
  2032 + '<a href="'+data[i]['alias']+'" class="search_result_title" title="'+data[i]['title']+'">'+data[i]['title']+'</a>';
  2033 + if (data[i]['discounted_price'] !== undefined) {
  2034 + html +=
  2035 + '<p class="search_result_price">' +
  2036 + 'цена от <span class="price" style="text-decoration: line-through;">'+data[i]['price2']+'</span> грн<br/>' +
  2037 + '<span class="price">'+data[i]['discounted_price']+'</span> грн'+
  2038 + '</p>';
  2039 + }
  2040 + else {
  2041 + html += '<p class="search_result_price">цена от <span class="price">'+data[i]['price2']+'</span> грн</p>';
  2042 + }
  2043 + html +=
2034 2044 '</li>';
2035 2045 }
2036 2046  
... ...