discounted configurables

This commit is contained in:
merdan 2022-04-23 17:17:55 +05:00
parent 2d7cf8d70e
commit 8e703524d7
4 changed files with 206 additions and 2 deletions

View File

@ -10,6 +10,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\OrderController;
class Orders extends OrderController
{
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale'];
public function __construct(protected OrderRepository $orderRepository,
protected OrderItemRepository $orderItemRepository)
{

View File

@ -27,7 +27,7 @@ class OrderResource extends JsonResource
return [
'id' => $this->id,
'status' => $this->status,
'status_label' => $this->status_label,
'status_label' => trans('admin::app.sales.order-status-'.$this->status),
'shipping_method' => $this->shipping_method,
'shipping_title' => $this->shipping_title,
'payment_title' => core()->getConfigData('sales.paymentmethods.' . $this->payment->method . '.title'),

View File

@ -4,5 +4,181 @@ return [
'scrap' => 'Scrap',
'scrap-categories' => 'Categories',
'scrap-products' => 'Products'
]
],
'sales' => [
'orders' => [
'title' => 'Orders',
'view-title' => 'Order #:order_id',
'cancel-btn-title' => 'Cancel',
'shipment-btn-title' => 'Ship',
'invoice-btn-title' => 'Invoice',
'info' => 'Information',
'invoices' => 'Invoices',
'shipments' => 'Shipments',
'order-and-account' => 'Order and Account',
'order-info' => 'Order Information',
'order-date' => 'Order Date',
'order-status' => 'Order Status',
'order-status-canceled' => 'Canceled',
'order-status-closed' => 'Closed',
'order-status-fraud' => 'Fraud',
'order-status-pending' => 'Pending',
'order-status-pending-payment' => 'Pending Payment',
'order-status-processing' => 'Processing',
'order-status-success' => 'Completed',
'channel' => 'Channel',
'customer-name' => 'Customer Name',
'email' => 'Email',
'contact-number' => 'Contact Number',
'account-info' => 'Account Information',
'address' => 'Address',
'shipping-address' => 'Shipping Address',
'billing-address' => 'Billing Address',
'payment-and-shipping' => 'Payment and Shipping',
'payment-info' => 'Payment Information',
'payment-method' => 'Payment Method',
'currency' => 'Currency',
'shipping-info' => 'Shipping Information',
'shipping-method' => 'Shipping Method',
'shipping-price' => 'Shipping Price',
'products-ordered' => 'Products Ordered',
'SKU' => 'SKU',
'product-name' => 'Product Name',
'qty' => 'Qty',
'item-status' => 'Item Status',
'item-ordered' => 'Ordered (:qty_ordered)',
'item-invoice' => 'Invoiced (:qty_invoiced)',
'item-shipped' => 'Shipped (:qty_shipped)',
'item-canceled' => 'Canceled (:qty_canceled)',
'item-refunded' => 'Refunded (:qty_refunded)',
'price' => 'Price',
'total' => 'Total',
'subtotal' => 'Subtotal',
'shipping-handling' => 'Shipping & Handling',
'discount' => 'Discount',
'tax' => 'Tax',
'tax-percent' => 'Tax Percent',
'tax-amount' => 'Tax Amount',
'discount-amount' => 'Discount Amount',
'grand-total' => 'Grand Total',
'total-paid' => 'Total Paid',
'total-refunded' => 'Total Refunded',
'total-due' => 'Total Due',
'cancel-confirm-msg' => 'Are you sure you want to cancel this order ?',
'refund-btn-title' => 'Refund',
'refunds' => 'Refunds',
'comment-added-success' => 'Comment addded successfully.',
'comment' => 'Comment',
'submit-comment' => 'Submit Comment',
'notify-customer' => 'Notify Customer',
'customer-notified' => ':date | Customer <b>Notified</b>',
'customer-not-notified' => ':date | Customer <b>Not Notified</b>',
'transactions' => 'Transactions',
],
'invoices' => [
'title' => 'Invoices',
'id' => 'ID',
'invoice' => 'Invoice',
'invoice-id' => 'Invoice ID',
'date' => 'Invoice Date',
'order-id' => 'Order ID',
'customer-name' => 'Customer Name',
'status' => 'Status',
'amount' => 'Amount',
'action' => 'Action',
'add-title' => 'Create Invoice',
'save-btn-title' => 'Save Invoice',
'send-duplicate-invoice' => 'Send Duplicate Invoice',
'send' => 'Send',
'invoice-sent' => 'Invoice sent successfully!',
'qty' => 'Qty',
'qty-ordered' => 'Qty Ordered',
'qty-to-invoice' => 'Qty to Invoice',
'view-title' => 'Invoice #:invoice_id',
'bill-to' => 'Bill to',
'ship-to' => 'Ship to',
'print' => 'Print',
'order-date' => 'Order Date',
'invalid-qty' => 'We found an invalid quantity to invoice items.',
'creation-error' => 'Order invoice creation is not allowed.',
'product-error' => 'Invoice can not be created without products.',
'status-overdue' => 'Overdue',
'status-pending' => 'Pending Payment',
'status-paid' => 'Paid',
],
'shipments' => [
'title' => 'Shipments',
'id' => 'ID',
'date' => 'Shipment Date',
'order-id' => 'Order ID',
'order-date' => 'Order date',
'customer-name' => 'Customer Name',
'total-qty' => 'Total Qty',
'action' => 'Action',
'add-title' => 'Create Shipment',
'save-btn-title' => 'Save Shipment',
'qty-ordered' => 'Qty Ordered',
'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'Qty to Ship',
'available-sources' => 'Available Sources',
'source' => 'Source',
'select-source' => 'Please Select Source',
'qty-available' => 'Qty Available',
'inventory-source' => 'Inventory Source',
'carrier-title' => 'Carrier Title',
'tracking-number' => 'Tracking Number',
'view-title' => 'Shipment #:shipment_id',
'creation-error' => 'Shipment can not be created for this order.',
'order-error' => 'Order shipment creation is not allowed.',
'quantity-invalid' => 'Requested quantity is invalid or not available.',
],
'refunds' => [
'title' => 'Refunds',
'id' => 'ID',
'add-title' => 'Create Refund',
'save-btn-title' => 'Refund',
'order-id' => 'Order ID',
'qty-ordered' => 'Qty Ordered',
'qty-to-refund' => 'Qty To Refund',
'refund-shipping' => 'Refund Shipping',
'adjustment-refund' => 'Adjustment Refund',
'adjustment-fee' => 'Adjustment Fee',
'update-qty' => 'Update Quantities',
'invalid-qty' => 'We found an invalid quantity to refund items.',
'refund-limit-error' => 'The most money available to refund is :amount.',
'refunded' => 'Refunded',
'date' => 'Refund Date',
'customer-name' => 'Customer Name',
'status' => 'Status',
'action' => 'Action',
'view-title' => 'Refund #:refund_id',
'invalid-refund-amount-error' => 'Refund amount should be non zero.',
],
'transactions' => [
'title' => 'Transactions',
'create-title' => 'Add transaction',
'id' => 'ID',
'transaction-id' => 'Transaction ID',
'payment-method' => 'Payment method',
'transaction-amount' => 'Transaction amount',
'action' => 'Action',
'view-title' => 'Transaction #:transaction_id',
'transaction-data' => 'Transaction Data',
'order-id' => 'Order ID',
'invoice-id' => 'Invoice ID',
'status' => 'Status',
'created-at' => 'Created At',
'transaction-details' => 'Transaction Details',
'response' => [
'invoice-missing' => 'This invoice id does not exist',
'transaction-saved' => 'The transaction has been saved',
'already-paid' => 'This invoice has already been paid',
],
],
],
];

View File

@ -0,0 +1,27 @@
<?php
return [
'sales' => [
'orders' => [
'title' => 'Orders',
'view-title' => 'Order #:order_id',
'cancel-btn-title' => 'Cancel',
'shipment-btn-title' => 'Ship',
'invoice-btn-title' => 'Invoice',
'info' => 'Information',
'invoices' => 'Invoices',
'shipments' => 'Shipments',
'order-and-account' => 'Order and Account',
'order-info' => 'Order Information',
'order-date' => 'Order Date',
'order-status' => 'Order Status',
'order-status-canceled' => 'Ýatyrylan',
'order-status-closed' => 'Gaýtarylan',
'order-status-fraud' => 'Näsaz',
'order-status-pending' => 'Garaşylýar',
'order-status-pending-payment' => 'Tölege garaşylýar',
'order-status-processing' => 'Işlenilýär',
'order-status-success' => 'Tamamlandy',
],
],
];