mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 20:07:12 +02:00
Optimized twig and payment methods
This commit is contained in:
@@ -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 %}
|
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user