Add twig extra bundle to use currency formatter filter. Add custom twig method to display number of active promos. Remove old index.php file.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<td class="align-middle font-weight-bold h3"><a class="text-warning text-decoration-none"
|
||||
href="{{ path('app_star', {'productId': product.id}) }}">{% if product.starred %}★{% else %} ☆ {% endif %}</a></td>
|
||||
<td><img src='{{ product.image }}&width=150' class='border rounded p-1' alt='{{ product.name }}'/></td>
|
||||
<td><a href='{{ path('app_home') }}/product/{{ product.id }}' class="text-decoration-none">{{ product.name }}</a></td>
|
||||
<td><a href='{{ path('app_product', {'productId': product.id}) }}' class="text-decoration-none">{{ product.name }}</a></td>
|
||||
<td>{{ product.subTitle }}</td>
|
||||
<td>
|
||||
<ul class='nav'>
|
||||
@@ -36,9 +36,9 @@
|
||||
</thead>
|
||||
{% for price in product.price %}
|
||||
<tr>
|
||||
<td>{{ price.price }}</td>
|
||||
<td>{{ price.lowestProductPrice30Days }}</td>
|
||||
<td>{{ price.productStandardPrice }}</td>
|
||||
<td>{{ price.price | format_currency('PLN', {}, 'pl') }}</td>
|
||||
<td>{{ price.lowestProductPrice30Days | format_currency('PLN', {}, 'pl') }}</td>
|
||||
<td>{{ price.productStandardPrice | format_currency('PLN', {}, 'pl') }}</td>
|
||||
<td>{{ price.created_at }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
</ul>
|
||||
</td>
|
||||
<td class="align-middle"><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td>
|
||||
<td class="align-middle">{{ product.price.last.price }}</td>
|
||||
<td class="align-middle">{% if product.price.last.price != product.price.last.productStandardPrice %}<span class="text-decoration-line-through text-warning">{{ product.price.last.productStandardPrice }}</span> <span class="text-success">{{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%</span>{% else %}{% endif %}</td>
|
||||
<td class="align-middle">{{ product.price.last.price | format_currency('PLN', {}, 'pl') }}</td>
|
||||
<td class="align-middle">{% if product.price.last.price != product.price.last.productStandardPrice %}<span class="text-decoration-line-through text-warning">{{ product.price.last.productStandardPrice | format_currency('PLN', {}, 'pl') }}</span> <span class="text-success">{{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%</span>{% else %}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ path('app_promos') }}">Promos</a>
|
||||
<a class="nav-link active" aria-current="page" href="{{ path('app_promos') }}">Promos ({{ promosCount() }})</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex col-lg-6 col-sm-8" role="search" action="{{ path('app_search') }}">
|
||||
|
||||
Reference in New Issue
Block a user