Fix product page not loading

This commit was merged in pull request #53.
This commit is contained in:
2026-01-21 08:31:54 +01:00
committed by krzysiej
parent 646383fb6a
commit 0042fda5cc

View File

@@ -42,13 +42,14 @@
<th>Stock</th>
</tr>
</thead>
{% set stock = product.stock().get() %}
{% for price in product.price %}
<tr>
<td>{{ price.price | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.lowestProductPrice30Days | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}</td>
<td>{{ price.created_at }}</td>
<td>{{ (product.stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td>
<td>{{ (stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td>
</tr>
{% endfor %}
</table>