本文档由 Apifox 自动生成,推荐使用 Apifox - API 文档、API 调试、API Mock、API 自动化测试!
single order page template
can aid customers in viweing an order details such as items, prices, quantities and order status.
master.twig
, and accordingly, it takes the unified look-and-feel. For example, all of the header's
and footer's
components will be added automatically to this page.User
model is accessible automatically on this page because it's included in the master.twig
layout file.<salla-button>
<salla-rating-modal>
<salla-map>
(Read Only)<salla-modal>
<salla-rating-stars>
single order page template
allows calling the following hooks in order to inject more information:
order
that is currently being handeled. For example below we have a table that shows the order's order.created_at
, order.shipping.logo
, order.shipping.name
, order.shipping.number
, order.status.name
. This is to disaply the shipping information of the order.
items/products
. For this, we use a for-loop statement to show the details of each item/product:
options
as per the customer selection. These options can be displayed as follows:
sub_products
along with any item/product. Following, is an example for displaying any sub products:
files
or notes
. These elements can be displayed using for-loop
as we see in the following example:
order.discounts
can be retrieved to check if there is any discount added to the order as below:
order.cod_cost
is evaluated to true in the case of selecting Cash on Delivery as the payment method.order.shipping_cost
shows the shipping cost if there is any. Similarly, the variable order.tax
shows the amount of any added tax. The following is an example of all of the above variables:
order.can_reorder
. However, if the customer has not paid for the order yet, the page will redirected to the payment page via the variable order.payment_url
to finish the payment.salla-modal
and salla-button
are used in here to show the user a modal to choose either to reorder or to cancel.
order.can_cancel
.salla-button
in order to show buttons with actions.
salla-rating-stars
component allows the developer to add a modal/button prompting customer to rate the order.