Skip to main content
Orders are the heartbeat of your e-commerce store. They represent the culmination of your customers’ journeys, from browsing products to completing purchases. Effectively managing orders is essential to ensuring a seamless experience for both your customers and your team. Order processing is one of the critical aspects of e-commerce business. Such activities as creating orders/create invoices/create shipments, and refunds (if necessary), should always be organized logically. This documentation serves as your comprehensive user guide to managing orders in Shopper. Whether you’re an administrator or a store manager, you’ll find everything you need to navigate the order management process with ease. The following pages will walk you through:
  • Viewing and filtering orders.
  • Create order.
  • Updating order statuses.
  • Managing customer information and order details.

Overview

In Shopper, orders are typically created when a customer completes the checkout process on your store. When a customer places an order from your store, on the admin panel, the order status is generated from where the admin can further process the order. However, you also have the ability to update the Order Component to create and manage orders manually through the admin panel. Orders are accessible to users with the appropriate permissions, ensuring that your store’s operations remain secure and organized.
Shopper Orders

Orders

Models

Order management and processing in Shopper are powered by a set of Models that work together seamlessly. These Models represent the core entities involved in handling orders, from creation to fulfillment.
  • Order (Shopper\Core\Models\Order) represents a customer’s purchase, including details like order status, payment method, and total amount.
  • OrderItem (Shopper\Core\Models\OrderItem) tracks individual products included in an order, along with quantities and prices.
  • OrderAddress (Shopper\Core\Models\OrderAddress) responsible for managing the shipping and billing addresses associated with an order
  • OrderRefund (Shopper\Core\Models\OrderRefund) manages refund requests and processes, including amounts and reasons for refunds.
  • OrderShipping (Shopper\Core\Models\OrderShipping)

Order

As mentioned above, initially on Shopper it is not possible to create orders from the administration area. Orders can only be placed from your customer site, and will be available and processed in your administration area. However, you have the option of publishing order-related components to customize them to your needs.

Fields

NameTypeRequiredNotes
idautoincauto
numberstringyesOrder number, can be generate using the generate_number() helper
price_amountintnoThe order price, if not set the price can be determine using the items price
statusstringyes[OrderStatus](#enums-types) Enum value
currency_codestringyes
notestextno
parent_order_idintnoint (Order object via the parent relation)
payment_method_idintnoint (PaymentMethod object via the paymentMethod relation)
channel_idintnoint (Channel object via the channel relation)
customer_idintnoint (User object via the customer relation)
zone_idintnoint (Zone object via the zone relation)
billing_address_idintnoint (OrderAddress object via the billingAddress relation)
shipping_address_idintnoint (OrderAddress object via the shippingAddress relation)
shipping_option_idintnoint (CarrierOption object via the shippingOption relation)
canceled_attimestampno

Create an Order

An order is created when a customer visits your online store, selects one or more products, and completes the checkout process. When a customer places an order through the storefront, the order details are automatically generated in the admin panel. From there, administrators can view, update, and process the order as needed.
use Shopper\Core\Models\Order;

$order = Order::query()->create([
    'number' => generate_number(),
    'customer_id' => Auth::id(),
    'currency_code' => current_currency(),
]);
But to get to this stage, you need to add a product to your basket, define a delivery and billing address, select your payment method and place your order. Don’t worry, Shopper provides Starter kits like Breeze to give you a code base for setting up your storefront.

Front a storefront

Step 1 > Open the Product Detail page and Add the product to the cart as shown below.
product storefront

Product details

Step 2 > Now proceed to checkout inside the Shopping Cart as shown below.
Shopping cart storefront

Shopping cart

Step 3 > Next, you will get redirected to the checkout page and fill in the necessary information regarding the Billing Address & Shipping Address as shown below.
checkout address storefront

Checkout billing address

Step 4 > After confirming add the shipping method and proceed to the payment step as shown in the below image.
checkout shipping storefront

Checkout shipping method

Step 5 > After choose your payment method, click on Place Order as shown in the below image.
checkout payment storefront

Checkout payment

Step 6 > After clicking on Place Order, the next page will open like below then you will get an Order ID.
order place storefront

Order place

This order will be available in your administration cpanel.
Orders with zone

Orders List with zones

Zones are markets in which customers can place orders. By default, zones are not configured, but if you plan to sell in different zones (Europe, Africa, or even a specific country such as England) you should configure them via your admin panel

OrderItem

NameTypeRequiredNotes
idautoincauto
namestringnoThe product name at the moment of buying
skustringnoUnique, default value is generated using collection name
productmorphyesmorph relation generate product_id and product_type columns
quantityintyesUnique, default value is generated using collection name
unit_price_amountintyesUnique, default value is generated using collection name
order_idintyesint (Order object via the order relation)

OrderAddress

NameTypeRequiredNotes
idautoincauto
customer_idintyesint (User object via the customer relation)
last_namestringyes
first_namestringyes
first_namestringyes
companystringno
street_addressstringyes
street_address_plusstringno
postal_codestringyes
citystringyes
phonestringyes
country_namestringnoThe country name

OrderRefund

NameTypeRequiredNotes
idautoincauto
reasonstringnoThe reason of the refund
amountintyesThe amount to refund
currencystringyes
statusstringyes[OrderRefundStatus](#enums-types) Enum value
notesstringnoOther notes for the refund: by the administrator
order_idintyesint (Order object via the order relation)
user_idintnoint (User object via the customer relation)

OrderShipping

NameTypeRequiredNotes
idautoincauto
shipped_atdatetimeyes
received_atdatetimeno
returned_atdatetimeno
tracking_numberstringno
tracking_urlstringno
voucherjsonno
order_idintyesint (Order object via the order relation)
carrier_idintnoint (Carrier object via the carrier relation) Eg: DHL, UPS, etc

Enums Types

Components