eCommerce

Online-Shop

MarktplatzBetriebVersion 0.2.0manifest

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.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
nametextnoneneinecommerce.userim KlartextCategory name shown in the shop
slugtextnoneneinecommerce.userim KlartextURL part of the category, lowercase with dashes
descriptiontextnoneneinecommerce.userim KlartextShort text about the category
sequencenumbernoneneinecommerce.userim KlartextOrder among categories, lowest first
publishedboolnoneneinecommerce.userim KlartextWhether the category is visible to shoppers

ecommerce_listing ​

A product as it appears in the online shop

Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
product_idref → productnoneneinecommerce.userim KlartextThe product being sold online
titletextnoneneinecommerce.userim KlartextTitle shown in the shop
slugtextnoneneinecommerce.userim KlartextURL part of the product page, lowercase with dashes
summarytextnoneneinecommerce.userim KlartextOne or two sentences shown on product cards
descriptionlongtextnoneneinecommerce.userim KlartextDescription shown on the product page, in Markdown
category_idref → ecommerce_categorynoneneinecommerce.userim KlartextThe category the listing is shown under
pricemoneynoneneinecommerce.userim KlartextShop price including tax (minor currency units, e.g. cents)
compare_at_pricemoneynoneneinecommerce.userim KlartextPrevious price shown crossed out (minor currency units)
currencytextnoneneinecommerce.userim KlartextISO 4217 currency code of the prices, for example EUR; empty means the shop currency from the instance settings
skutextnoneneinecommerce.userim KlartextStock keeping unit shown on the product page
stock_policyselect (always_available, block_when_out, allow_backorder)noneneinecommerce.userim KlartextWhat happens when stock runs out: always_available, block_when_out, allow_backorder
stock_quantitynumbernoneneinecommerce.userim KlartextUnits on hand, used with the stock policy. Orders do not reduce it: adjust it by hand
publishedboolnoneneinecommerce.userim KlartextWhether the listing is visible to shoppers

ecommerce_listing_translation ​

A listing translated into another language

Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
listing_idref → ecommerce_listingnoneneinecommerce.userim KlartextThe listing this translates
langselect (en, de, fr, pl, fi, sv, es)noneneinecommerce.userim KlartextLanguage of the translation: en, de, fr, pl, fi, sv or es
titletextnoneneinecommerce.userim KlartextTranslated title
summarytextnoneneinecommerce.userim KlartextTranslated card text
descriptionlongtextnoneneinecommerce.userim KlartextTranslated description in Markdown
publishedboolnoneneinecommerce.userim KlartextWhether 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.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
nametextnoneneinecommerce.userim KlartextName shown at checkout, for example Standard delivery
carriertextnoneneinecommerce.userim KlartextCarrier that delivers, for example DHL
pricemoneynoneneinecommerce.userim KlartextDelivery price (minor currency units)
free_overmoneynoneneinecommerce.userim KlartextOrder total above which delivery is free (minor currency units); empty means never
delivery_daysnumbernoneneinecommerce.userim KlartextUsual number of days until delivery
activeboolnoneneinecommerce.userim KlartextWhether shoppers can choose it

ecommerce_discount_code ​

A code a shopper enters at checkout for a reduction

Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.manager.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
codetextnoneneinecommerce.userim KlartextThe code shoppers type, for example SPRING10
kindselect (percent, fixed)noneneinecommerce.userim KlartextType of reduction: percent or fixed
valuenumbernoneneinecommerce.userim KlartextReduction: basis points for percent (1000 is 10.00 percent), minor currency units for fixed
starts_ondatenoneneinecommerce.userim KlartextFirst day the code works (YYYY-MM-DD)
ends_ondatenoneneinecommerce.userim KlartextLast day the code works (YYYY-MM-DD)
max_usesnumbernoneneinecommerce.userim KlartextHow many times the code may be used in total; empty means unlimited
used_countnumbernoneneinecommerce.userim KlartextHow many times it has been used (kept up to date by hand)
minimum_ordermoneynoneneinecommerce.userim KlartextSmallest order total the code applies to (minor currency units)
activeboolnoneneinecommerce.userim KlartextWhether the code can be used

ecommerce_order ​

An order placed online

Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
numbertextnoneneinecommerce.userim KlartextOrder number shown to the shopper. Free text: packages cannot generate sequences; the public checkout makes a random one
customer_emailtextinternaljaecommerce.usermaskiertEmail address of the shopper
customer_nametextinternaljaecommerce.usermaskiertName of the shopper
customer_idref → partynoneneinecommerce.userim KlartextThe matching contact, once the shopper is known
shipping_addresslongtextinternaljaecommerce.usermaskiertDelivery address
billing_addresslongtextinternaljaecommerce.usermaskiertBilling address when different from delivery
shipping_method_idref → ecommerce_shipping_methodnoneneinecommerce.userim KlartextThe chosen way of delivery
discount_code_idref → ecommerce_discount_codenoneneinecommerce.userim KlartextThe discount code used, if any
placed_ondatenoneneinecommerce.userim KlartextDay the order was placed (YYYY-MM-DD)
currencytextnoneneinecommerce.userim KlartextISO 4217 currency code, for example EUR
subtotalmoneynoneneinecommerce.userim KlartextSum of the lines (minor currency units, entered not computed)
discount_totalmoneynoneneinecommerce.userim KlartextReduction from the discount code (minor currency units)
shipping_totalmoneynoneneinecommerce.userim KlartextDelivery charge (minor currency units)
tax_totalmoneynoneneinecommerce.userim KlartextTax included in the total (minor currency units)
totalmoneynoneneinecommerce.userim KlartextAmount the shopper pays (minor currency units)
payment_referencetextfinancialjaecommerce.userzurückgehaltenReference from the payment provider; never a card number
tracking_referencetextnoneneinecommerce.userim KlartextCarrier tracking number
access_tokentextsecretneinecommerce.userzurückgehaltenSecret link token that lets the shopper who placed a public order see its confirmation page. Nobody can read it back
stateselect (pending, paid, shipped, delivered, cancelled, refunded)noneneinecommerce.userim KlartextFulfilment status: pending, paid, shipped, delivered, cancelled, refunded

ecommerce_order_line ​

One product line of a web order

Lesegruppe: ecommerce.user. Schreibgruppe: ecommerce.user.

FeldArtDatenklassePersonenbezogene DatenGruppeAgenten sehenBeschreibung
order_idref → ecommerce_ordernoneneinecommerce.userim KlartextThe order the line belongs to
product_idref → productnoneneinecommerce.userim KlartextThe product ordered
listing_idref → ecommerce_listingnoneneinecommerce.userim KlartextThe shop listing the line was ordered from
descriptiontextnoneneinecommerce.userim KlartextProduct text as it was when ordered
quantitynumbernoneneinecommerce.userim KlartextUnits ordered
unit_pricemoneynoneneinecommerce.userim KlartextPrice per unit including tax (minor currency units)
subtotalmoneynoneneinecommerce.userim KlartextLine total (minor currency units, entered not computed)

Workflows ​

ecommerce_order ​

AktionBewegtWer sie ausführen darfFreigabe
ecommerce_order.mark_paidstate: pending → paidecommerce.usernein
ecommerce_order.shipstate: paid → shippedecommerce.usernein
ecommerce_order.deliverstate: shipped → deliveredecommerce.usernein
ecommerce_order.cancelstate: pending → cancelledecommerce.usernein
ecommerce_order.refundstate: paid → refundedecommerce.managerja
ecommerce_order.refund_deliveredstate: delivered → refundedecommerce.managerja

Berechtigungsgruppen ​

Von dieser App verwendete Gruppen:

  • ecommerce.manager
  • ecommerce.user

Freigabeschritte ​

Schritte, die ein Agent nur vorschlagen kann:

  • ecommerce_order.refund
  • ecommerce_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 ​

  • base
  • product

Installation ​

Installieren Sie sie in der App Customize (Marktplatz) oder über die Kommandozeile:

bash
obop modules install-from ecommerce

Erfordert eine Datenbank und Administratorrechte.

Selbst bauen ​

Der Modulleitfaden zeigt, wie Apps wie diese geschrieben werden