Optimized twig and payment methods

This commit is contained in:
Kevin Frantz
2018-07-15 14:32:56 +02:00
parent 18382d6633
commit 3fdcd47e9c
5 changed files with 31 additions and 16 deletions

View File

@@ -16,10 +16,20 @@ basket
<tr>
<td>{{product.id}}</td>
<td>{{product.name}}</td>
<td>{{product.price.netto.float}}</td>
<td>{{product.price.netto.float}} {{product.price.netto.symbol}}</td>
<td>{{product.price.tax}}</td>
<td>{{product.price.gross.float}}</td>
<td>{{product.price.gross.float}} {{product.price.gross.symbol}}</td>
</tr>
{% endfor %}
</table>
<form method="post">
<select class="form-control form-control-lg">
<option value="" disabled selected>Payment method</option>
{% for key,payment in payment_methods %}
<option value="{{ key }}">{{ payment.name }}</option>
{% endfor %}
</select>
<input type="hidden" name="store" value="1" />
<input type="submit" class="btn btn-primary" value="Order" />
</form>
{% endblock %}

View File

@@ -2,12 +2,5 @@
{% block title %}Homepage{% endblock %}
{% block content %}
<h2>Welcome to the online shop!</h2>
You have the following options:
<ul>
{% for option in menu_items %}
<li>
<a href="{{option.getUrl}}">{{option.getName}}</a>
</li>
{% endfor %}
</ul>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Signs%2C_signs_and_more_signs_%282504183343%29.jpg/1280px-Signs%2C_signs_and_more_signs_%282504183343%29.jpg" />
{% endblock %}