This widget is used to show all the information about a user's orders in his account.
items | This field contains an array of items for which the order has been placed. Array contains items_id, name, alias, discounts and other details. |
---|---|
This field contains email id of a customer. | |
sub_total | This field contains the total amount of the order before any shipping charges or taxes are applied on it. |
total | This field contains total amount paid for the order. |
item_count | This contains total numbers of items which are added to cart. |
billing_address | The billing address associated with the payment method. This address is an optional field that will not be available on orders that do not require one. It has the following properties: full_name: The full name of the person associated with the payment method. address: The street address of the billing address. city: The city of the billing address. state: The state of the billing address. country: The name of the country of the billing address. zip: The zip or postal code of the billing address. phone: The phone number at the billing address. |
shipping_address | The shipping address associated with the payment method. This address is mandatory. It has the following properties: full_name: The full name of the person associated with the payment method. address: The street address of the shipping address. city: The city of the shipping address. state: The state of the shipping address. country: The name of the country of the shipping address. zip: The zip or postal code of the shipping address. phone: The phone number at the shipping address. |
taxes_total | This field contains the total tax amount charged on the order. |
taxes | It is an array of object containing details of taxes applied on the order. |
shipping_total | This field contains the total shipping amount charged on the order. |
ecoupon | It contains the information about the coupon applied on the order. |
discounts | It is an array of object containing details of the discounts applied on the order. |
status | The current status of the order, like open, closed, cancelled, refunded, etc. |
currency | It is an object containing name and conversion_rate of currency, at the time when order was placed. |
order_id | The unique identifier of the order that has been placed. |
options | It contains the information about the order options applied on the order. |
payment_method | This field contains the object of payment gateway via which the order has been placed. This contains _id, name, type and settings. |
shipping_method | This field contains the object of shipping method which has been applied on the order. This contains _id, name and price of shipping method. |
additional_charges | It is an array of object containing details of additional charges applied on the order. |
financial_status | It tells whether the order is paid or pending (COD). |
metafields | It contains the additional data related to the order (if any). |
created_on | Gives us information about the date and time when the order was placed. |
shipping_status | It tells about the status of shipping like shipped, in transit, RTO, delivered, etc. |
fulfillments | It is an array of object containing details of fulfilled items of the order. |
fulfillment_status | It tells about the status of the fulfillments. |
wallets | It is an array of object containing details of the wallets used while placing the order. |
<h5 class="p-3 mb-0">My Orders</h5>
<div v-if="!ms.page.query.order_id" class="container p-3">
<ms-user-orders>
<table class="table order-list" v-if="orders.length">
<thead>
<tr>
<th>OrderId</th>
<th>Order Date</th>
<th>Total Amount</th>
<th>Total Quantity</th>
<th>Order Status</th>
<th>Shipping Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr v-for="order in orders">
<td data-label="order_id">{{order.order_id}}</td>
<td data-label="created_on">{{order.created_on}}</td>
<td data-label="total">{{order.total}}</td>
<td data-label="items">{{order.items.length}}</td>
<td data-label="status">{{order.shipping_status ? order.shipping_status : 'Open'}}</td>
<td data-label="Tracking status" > {{order.fulfillment_status ? order.fulfillment_status : 'Pending'}}</td>
<td data-label="action">
<a class="btn btn-primary p-1 m-1" role="button" @click="ms.goTo('/account/orders?order_id=' + order._id)">View</a>
<a v-if="order.status == 'open' && !order.shipping_status"
class="btn btn-danger p-1 m-1" role="button" @click="cancelOrder(order._id)">Cancel Order</a>
<a class="btn btn-danger p-1 m-1" v-if="!order.return_submitted && order.shipping_status == 'Delivered'
&& order.status != 'refunded' && (!order.returned_items || order.items.length != order.returned_items.length)"
@click="ms.dialog({widget: 'return-order', props: {order: order}}).showModal()" >Return Order</a>
</td>
</tr>
</tbody>
</table>
<div class="mt-5 text-center" v-if="!orders.length && !loading">
<h6 class="text-center py-5">No Orders Found</h6>
</div>
</ms-user-orders>
</div>
<div v-if="ms.page.query.order_id" class="container p-3">
<w-order-summary></w-order-summary>
</div>
<div ms-widget="ms.userOrders" >
<div>
<h4>YOUR ORDERS</h4>
<div>
<div ng-if="orders.length==0">
<p>You have not made any previous orders!</p>
</div>
<div ng-if="orders.length > 0 ">
<table>
<thead>
<tr>
<th class="padding">Order ID</th>
<th class="padding">Order Date</th>
<th class="padding">Total Amount</th>
<th class="padding">Total Quantity</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="order in orders">
<td class="padding">{{order.order_id}}</td>
<td class="padding">{{order.created_on|date:'medium'}}</td>
<td class="padding">{{order.total|msCurrency:order.currency.name}}</td>
<td class="padding">{{order.item_count}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>