{% extends 'Layouts/Doc/default.html.twig' %}
{% block title %}
{{ 'app.documentation.menu.architecture.drivers'|trans }}
{% endblock %}
{% block headerPageTitle %}
{{ 'app.documentation.menu.workflow.orders'|trans|upper }}
{% endblock %}
{% block body %}
<div class="card mb-12">
<div class="card-body flex-column p-5">
<div class="d-flex align-items-center h-lg-100px p-5 p-lg-15">
<div class="row">
<div class="col-md-12 pt-5 scroll-y">
<div class="position-relative w-100 text-gray-800">
<p><strong>The Orders status</strong> is integrated to be able to know the fate of orders at any time, these statuses act as indicators of temporal progress until delivery or cancellation of the order for whatever reason:</p></div>
</div>
</div>
</div>
<div class="d-flex flex-column">
<div class="row table-responsive">
<div class="col-12 offset-3">
{% include 'Doc/Diagram/payment.html.twig' %}
</div>
</div>
</div>
<div class="d-flex align-items-center p-lg-15">
<div class="row">
<div class="col-md-12 pt-5 scroll-y">
{% include 'Doc/States/states_constants_title.html.twig' %}
<ul>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.new} %}
<ul>
<li>The new status indicates that an order has been <strong>newly placed</strong> or <strong>created</strong> (duplication includes). It represents the initial stage of the process, where the order details have been received, but no further processing has taken place yet.</li>
</ul>
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.in_progress} %}
<ul>
<li>After the creation of an order, if an action affecting the order's status excluding the statuses <strong>{{ checkoutConstants.cancelled }}</strong>, <strong>{{ checkoutConstants.failed }}</strong>, <strong>{{ checkoutConstants.delivered }}</strong> and <strong>{{ checkoutConstants.refunded }}</strong> the order status becomes <strong>{{ orderConstants.in_progress }}</strong>.</li>
</ul>
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.rejected} %}
{% include 'Doc/States/Status/rejected.html.twig' %}
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.cancelled} %}
{% include 'Doc/States/Status/cancelled.html.twig' %}
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.failed} %}
<ul>
<li>When a payment transaction fails... <a href="{{ path('foxorders_documentation_payment') }}#failed-section">read more</a>.</li>
<li>The second reason is that the order has expired.</li>
</ul>
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.fulfilled} %}
<ul>
<li>If the order is delivered, the status becomes <strong>{{ orderConstants.fulfilled }}</strong>.</li>
</ul>
</li>
<li>
{% include 'Doc/States/states_constants.html.twig' with {'state': orderConstants.expired} %}
{% include 'Doc/States/Status/expired.html.twig' %}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
{% endblock %}