{% assign already_order = false %}
{% for customer_order in customer.orders %}
{% if customer_order.cancelled == false %}
{% for orderd_item in customer_order.line_items %}
{% if orderd_item.product_id == product.id %}
{% assign already_order = true %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme