eCommerce
Online-Shop
Wofür sie gedacht ist
Store the data of an online shop: listings, shipping methods, discount codes and web orders with a fulfilment flow. Refunds need a manager and an approval. A storefront or other client reads and writes this data through the API.
Was das Paket leistet und was nicht
An online shop: categories, product listings with translations, shipping methods, discount codes, web orders with lines and a fulfilment flow of pending, paid, shipped, delivered, cancelled and refunded. When the instance runs with the public site enabled, visitors browse the published listings and place orders without an account; the server prices every order from the published listing and never trusts the browser. There is no payment provider: an order starts as pending and the shop contacts the buyer. Refunds need a human approval from a manager; agents may only propose them. Customer name, email and addresses are personal data and are never public. Needs the Products package.
Modelle
ecommerce_category
A group of listings shown together in the shop
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
name | text | none | nein | ecommerce.user | im Klartext | Category name shown in the shop |
slug | text | none | nein | ecommerce.user | im Klartext | URL part of the category, lowercase with dashes |
description | text | none | nein | ecommerce.user | im Klartext | Short text about the category |
sequence | number | none | nein | ecommerce.user | im Klartext | Order among categories, lowest first |
published | bool | none | nein | ecommerce.user | im Klartext | Whether the category is visible to shoppers |
ecommerce_listing
A product as it appears in the online shop
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
product_id | ref → product | none | nein | ecommerce.user | im Klartext | The product being sold online |
title | text | none | nein | ecommerce.user | im Klartext | Title shown in the shop |
slug | text | none | nein | ecommerce.user | im Klartext | URL part of the product page, lowercase with dashes |
summary | text | none | nein | ecommerce.user | im Klartext | One or two sentences shown on product cards |
description | longtext | none | nein | ecommerce.user | im Klartext | Description shown on the product page, in Markdown |
category_id | ref → ecommerce_category | none | nein | ecommerce.user | im Klartext | The category the listing is shown under |
price | money | none | nein | ecommerce.user | im Klartext | Shop price including tax (minor currency units, e.g. cents) |
compare_at_price | money | none | nein | ecommerce.user | im Klartext | Previous price shown crossed out (minor currency units) |
currency | text | none | nein | ecommerce.user | im Klartext | ISO 4217 currency code of the prices, for example EUR; empty means the shop currency from the instance settings |
sku | text | none | nein | ecommerce.user | im Klartext | Stock keeping unit shown on the product page |
stock_policy | select (always_available, block_when_out, allow_backorder) | none | nein | ecommerce.user | im Klartext | What happens when stock runs out: always_available, block_when_out, allow_backorder |
stock_quantity | number | none | nein | ecommerce.user | im Klartext | Units on hand, used with the stock policy. Orders do not reduce it: adjust it by hand |
published | bool | none | nein | ecommerce.user | im Klartext | Whether the listing is visible to shoppers |
ecommerce_listing_translation
A listing translated into another language
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
listing_id | ref → ecommerce_listing | none | nein | ecommerce.user | im Klartext | The listing this translates |
lang | select (en, de, fr, pl, fi, sv, es) | none | nein | ecommerce.user | im Klartext | Language of the translation: en, de, fr, pl, fi, sv or es |
title | text | none | nein | ecommerce.user | im Klartext | Translated title |
summary | text | none | nein | ecommerce.user | im Klartext | Translated card text |
description | longtext | none | nein | ecommerce.user | im Klartext | Translated description in Markdown |
published | bool | none | nein | ecommerce.user | im Klartext | Whether the translation is shown; it is only reachable while its listing is published |
ecommerce_shipping_method
A way of delivering orders with its price
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
name | text | none | nein | ecommerce.user | im Klartext | Name shown at checkout, for example Standard delivery |
carrier | text | none | nein | ecommerce.user | im Klartext | Carrier that delivers, for example DHL |
price | money | none | nein | ecommerce.user | im Klartext | Delivery price (minor currency units) |
free_over | money | none | nein | ecommerce.user | im Klartext | Order total above which delivery is free (minor currency units); empty means never |
delivery_days | number | none | nein | ecommerce.user | im Klartext | Usual number of days until delivery |
active | bool | none | nein | ecommerce.user | im Klartext | Whether shoppers can choose it |
ecommerce_discount_code
A code a shopper enters at checkout for a reduction
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
code | text | none | nein | ecommerce.user | im Klartext | The code shoppers type, for example SPRING10 |
kind | select (percent, fixed) | none | nein | ecommerce.user | im Klartext | Type of reduction: percent or fixed |
value | number | none | nein | ecommerce.user | im Klartext | Reduction: basis points for percent (1000 is 10.00 percent), minor currency units for fixed |
starts_on | date | none | nein | ecommerce.user | im Klartext | First day the code works (YYYY-MM-DD) |
ends_on | date | none | nein | ecommerce.user | im Klartext | Last day the code works (YYYY-MM-DD) |
max_uses | number | none | nein | ecommerce.user | im Klartext | How many times the code may be used in total; empty means unlimited |
used_count | number | none | nein | ecommerce.user | im Klartext | How many times it has been used (kept up to date by hand) |
minimum_order | money | none | nein | ecommerce.user | im Klartext | Smallest order total the code applies to (minor currency units) |
active | bool | none | nein | ecommerce.user | im Klartext | Whether the code can be used |
ecommerce_order
An order placed online
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.user.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
number | text | none | nein | ecommerce.user | im Klartext | Order number shown to the shopper. Free text: packages cannot generate sequences; the public checkout makes a random one |
customer_email | text | internal | ja | ecommerce.user | maskiert | Email address of the shopper |
customer_name | text | internal | ja | ecommerce.user | maskiert | Name of the shopper |
customer_id | ref → party | none | nein | ecommerce.user | im Klartext | The matching contact, once the shopper is known |
shipping_address | longtext | internal | ja | ecommerce.user | maskiert | Delivery address |
billing_address | longtext | internal | ja | ecommerce.user | maskiert | Billing address when different from delivery |
shipping_method_id | ref → ecommerce_shipping_method | none | nein | ecommerce.user | im Klartext | The chosen way of delivery |
discount_code_id | ref → ecommerce_discount_code | none | nein | ecommerce.user | im Klartext | The discount code used, if any |
placed_on | date | none | nein | ecommerce.user | im Klartext | Day the order was placed (YYYY-MM-DD) |
currency | text | none | nein | ecommerce.user | im Klartext | ISO 4217 currency code, for example EUR |
subtotal | money | none | nein | ecommerce.user | im Klartext | Sum of the lines (minor currency units, entered not computed) |
discount_total | money | none | nein | ecommerce.user | im Klartext | Reduction from the discount code (minor currency units) |
shipping_total | money | none | nein | ecommerce.user | im Klartext | Delivery charge (minor currency units) |
tax_total | money | none | nein | ecommerce.user | im Klartext | Tax included in the total (minor currency units) |
total | money | none | nein | ecommerce.user | im Klartext | Amount the shopper pays (minor currency units) |
payment_reference | text | financial | ja | ecommerce.user | zurückgehalten | Reference from the payment provider; never a card number |
tracking_reference | text | none | nein | ecommerce.user | im Klartext | Carrier tracking number |
access_token | text | secret | nein | ecommerce.user | zurückgehalten | Secret link token that lets the shopper who placed a public order see its confirmation page. Nobody can read it back |
state | select (pending, paid, shipped, delivered, cancelled, refunded) | none | nein | ecommerce.user | im Klartext | Fulfilment status: pending, paid, shipped, delivered, cancelled, refunded |
ecommerce_order_line
One product line of a web order
Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.user.
| Feld | Art | Datenklasse | Personenbezogene Daten | Gruppe | Agenten sehen | Beschreibung |
|---|---|---|---|---|---|---|
order_id | ref → ecommerce_order | none | nein | ecommerce.user | im Klartext | The order the line belongs to |
product_id | ref → product | none | nein | ecommerce.user | im Klartext | The product ordered |
listing_id | ref → ecommerce_listing | none | nein | ecommerce.user | im Klartext | The shop listing the line was ordered from |
description | text | none | nein | ecommerce.user | im Klartext | Product text as it was when ordered |
quantity | number | none | nein | ecommerce.user | im Klartext | Units ordered |
unit_price | money | none | nein | ecommerce.user | im Klartext | Price per unit including tax (minor currency units) |
subtotal | money | none | nein | ecommerce.user | im Klartext | Line total (minor currency units, entered not computed) |
Workflows
ecommerce_order
| Aktion | Bewegt | Wer sie ausführen darf | Freigabe |
|---|---|---|---|
ecommerce_order.mark_paid | state: pending → paid | ecommerce.user | nein |
ecommerce_order.ship | state: paid → shipped | ecommerce.user | nein |
ecommerce_order.deliver | state: shipped → delivered | ecommerce.user | nein |
ecommerce_order.cancel | state: pending → cancelled | ecommerce.user | nein |
ecommerce_order.refund | state: paid → refunded | ecommerce.manager | ja |
ecommerce_order.refund_delivered | state: delivered → refunded | ecommerce.manager | ja |
Berechtigungsgruppen
Von dieser App verwendete Gruppen:
ecommerce.managerecommerce.user
Freigabeschritte
Schritte, die ein Agent nur vorschlagen kann:
ecommerce_order.refundecommerce_order.refund_delivered
Was Agenten tun können und was nicht
Ein Agent kann Datensätze dieser App lesen, durchsuchen, anlegen und aktualisieren sowie Aktionen ausführen, die keine Freigabe brauchen, und zwar innerhalb der Berechtigungsgruppen seines Tokens.
Diese Schritte kann er nur vorschlagen, und eine Person muss sie freigeben: ecommerce_order.refund, ecommerce_order.refund_delivered, ecommerce_category.delete, ecommerce_listing.delete, ecommerce_listing_translation.delete, ecommerce_shipping_method.delete, ecommerce_discount_code.delete, ecommerce_order.delete, ecommerce_order_line.delete.
Personenbezogene Daten werden als Platzhalter maskiert: ecommerce_order.customer_email, ecommerce_order.customer_name, ecommerce_order.shipping_address, ecommerce_order.billing_address.
Diese Felder werden Agenten vollständig vorenthalten: ecommerce_order.payment_reference, ecommerce_order.access_token.
Abhängigkeiten
baseproduct
Installation
Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:
obop modules install-from ecommerceErfordert eine Datenbank und Administratorrechte.
Selbst bauen
Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden