Социален Облак
Сподели виждането. Сподели успеха.
Начало
Решения
АВТОНОМЕН РАБОТНИК
Цени
За нас
Контакти
Няма намерени резултати
<% if (data.results && data.results.length> 0) { %> <% data.results.forEach(function(product) { %>
<%= product?.bg?.name %>
<%= product?.bg?.description || '' %>
<% if (product.BGN && product.BGN.price) { %>
<%= product.BGN.price.toFixed(2) %> BGN
<% } else if (product.EUR && product.EUR.price) { %>
<%= product.EUR.price.toFixed(2) %> EUR
<% } else if (product.USD && product.USD.price) { %>
<%= product.USD.price.toFixed(2) %> USD
<% } else { %>
0.00 BGN
<% } %>
<% }); %> <% } %>
Няма намерени резултати
БГ
EN
0
Вход
Начало
За нас
Услуги
Aвтономен работник
Цени
Контакти
Вход
Български
English
<% data.products.forEach(function(product) { %>
<% if (product.price && product.originalPrice && product.price < product.originalPrice) { %>
ПРОМОЦИЯ
<% } %>
<%= product.name %>
<% if (product.category && product.category.name) { %>
<%= product.category.name %>
<% } %>
<% for (let i = 1; i <= 5; i++) { %> <% if (i <= Math.floor(Math.random() * 2 + 4)) { %>
<% } else { %>
<% } %> <% } %>
(<%= Math.floor(Math.random() * 50 + 10) %>)
<% if (product.originalPrice && product.price < product.originalPrice) { %>
<%= product.price.toFixed(2) %> <%= product.currency || 'лв' %>
<%= product.originalPrice.toFixed(2) %> <%= product.currency || 'лв' %>
<% } else { %>
<%= product.price.toFixed(2) %> <%= product.currency || 'лв' %>
<% } %>
Добави в количка
<% }); %>
<% const currentPage = parseInt(data.page) || 1; const pageSize = parseInt(data.pageSize) || 12; const totalItems = data.count || 0; const totalPages = Math.ceil(totalItems / pageSize); %> <% if (totalPages > 1) { %>
Показани <%= Math.min((currentPage - 1) * pageSize + 1, totalItems) %>-<%= Math.min(currentPage * pageSize, totalItems) %> от <%= totalItems %> продукта
>
<% const startPage = Math.max(1, currentPage - 2); const endPage = Math.min(totalPages, currentPage + 2); %> <% if (startPage > 1) { %>
1
<% if (startPage > 2) { %>
...
<% } %> <% } %> <% for (let i = startPage; i <= endPage; i++) { %>
<%= i %>
<% } %> <% if (endPage < totalPages) { %> <% if (endPage < totalPages - 1) { %>
...
<% } %>
<%= totalPages %>
<% } %>
= totalPages ? 'disabled' : '' %> >
<% } %>