eCommerce

Boutique en ligne

Place de marchéOpérationsVersion 0.2.0manifest

À quoi elle sert ​

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.

Ce que fait et ne fait pas le paquet ​

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.

Modèles ​

ecommerce_category ​

A group of listings shown together in the shop

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
nametextnonenonecommerce.useren clairCategory name shown in the shop
slugtextnonenonecommerce.useren clairURL part of the category, lowercase with dashes
descriptiontextnonenonecommerce.useren clairShort text about the category
sequencenumbernonenonecommerce.useren clairOrder among categories, lowest first
publishedboolnonenonecommerce.useren clairWhether the category is visible to shoppers

ecommerce_listing ​

A product as it appears in the online shop

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
product_idref → productnonenonecommerce.useren clairThe product being sold online
titletextnonenonecommerce.useren clairTitle shown in the shop
slugtextnonenonecommerce.useren clairURL part of the product page, lowercase with dashes
summarytextnonenonecommerce.useren clairOne or two sentences shown on product cards
descriptionlongtextnonenonecommerce.useren clairDescription shown on the product page, in Markdown
category_idref → ecommerce_categorynonenonecommerce.useren clairThe category the listing is shown under
pricemoneynonenonecommerce.useren clairShop price including tax (minor currency units, e.g. cents)
compare_at_pricemoneynonenonecommerce.useren clairPrevious price shown crossed out (minor currency units)
currencytextnonenonecommerce.useren clairISO 4217 currency code of the prices, for example EUR; empty means the shop currency from the instance settings
skutextnonenonecommerce.useren clairStock keeping unit shown on the product page
stock_policyselect (always_available, block_when_out, allow_backorder)nonenonecommerce.useren clairWhat happens when stock runs out: always_available, block_when_out, allow_backorder
stock_quantitynumbernonenonecommerce.useren clairUnits on hand, used with the stock policy. Orders do not reduce it: adjust it by hand
publishedboolnonenonecommerce.useren clairWhether the listing is visible to shoppers

ecommerce_listing_translation ​

A listing translated into another language

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
listing_idref → ecommerce_listingnonenonecommerce.useren clairThe listing this translates
langselect (en, de, fr, pl, fi, sv, es)nonenonecommerce.useren clairLanguage of the translation: en, de, fr, pl, fi, sv or es
titletextnonenonecommerce.useren clairTranslated title
summarytextnonenonecommerce.useren clairTranslated card text
descriptionlongtextnonenonecommerce.useren clairTranslated description in Markdown
publishedboolnonenonecommerce.useren clairWhether the translation is shown; it is only reachable while its listing is published

ecommerce_shipping_method ​

A way of delivering orders with its price

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
nametextnonenonecommerce.useren clairName shown at checkout, for example Standard delivery
carriertextnonenonecommerce.useren clairCarrier that delivers, for example DHL
pricemoneynonenonecommerce.useren clairDelivery price (minor currency units)
free_overmoneynonenonecommerce.useren clairOrder total above which delivery is free (minor currency units); empty means never
delivery_daysnumbernonenonecommerce.useren clairUsual number of days until delivery
activeboolnonenonecommerce.useren clairWhether shoppers can choose it

ecommerce_discount_code ​

A code a shopper enters at checkout for a reduction

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.manager.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
codetextnonenonecommerce.useren clairThe code shoppers type, for example SPRING10
kindselect (percent, fixed)nonenonecommerce.useren clairType of reduction: percent or fixed
valuenumbernonenonecommerce.useren clairReduction: basis points for percent (1000 is 10.00 percent), minor currency units for fixed
starts_ondatenonenonecommerce.useren clairFirst day the code works (YYYY-MM-DD)
ends_ondatenonenonecommerce.useren clairLast day the code works (YYYY-MM-DD)
max_usesnumbernonenonecommerce.useren clairHow many times the code may be used in total; empty means unlimited
used_countnumbernonenonecommerce.useren clairHow many times it has been used (kept up to date by hand)
minimum_ordermoneynonenonecommerce.useren clairSmallest order total the code applies to (minor currency units)
activeboolnonenonecommerce.useren clairWhether the code can be used

ecommerce_order ​

An order placed online

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
numbertextnonenonecommerce.useren clairOrder number shown to the shopper. Free text: packages cannot generate sequences; the public checkout makes a random one
customer_emailtextinternalouiecommerce.usermasquéEmail address of the shopper
customer_nametextinternalouiecommerce.usermasquéName of the shopper
customer_idref → partynonenonecommerce.useren clairThe matching contact, once the shopper is known
shipping_addresslongtextinternalouiecommerce.usermasquéDelivery address
billing_addresslongtextinternalouiecommerce.usermasquéBilling address when different from delivery
shipping_method_idref → ecommerce_shipping_methodnonenonecommerce.useren clairThe chosen way of delivery
discount_code_idref → ecommerce_discount_codenonenonecommerce.useren clairThe discount code used, if any
placed_ondatenonenonecommerce.useren clairDay the order was placed (YYYY-MM-DD)
currencytextnonenonecommerce.useren clairISO 4217 currency code, for example EUR
subtotalmoneynonenonecommerce.useren clairSum of the lines (minor currency units, entered not computed)
discount_totalmoneynonenonecommerce.useren clairReduction from the discount code (minor currency units)
shipping_totalmoneynonenonecommerce.useren clairDelivery charge (minor currency units)
tax_totalmoneynonenonecommerce.useren clairTax included in the total (minor currency units)
totalmoneynonenonecommerce.useren clairAmount the shopper pays (minor currency units)
payment_referencetextfinancialouiecommerce.usernon communiquéReference from the payment provider; never a card number
tracking_referencetextnonenonecommerce.useren clairCarrier tracking number
access_tokentextsecretnonecommerce.usernon communiquéSecret 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)nonenonecommerce.useren clairFulfilment status: pending, paid, shipped, delivered, cancelled, refunded

ecommerce_order_line ​

One product line of a web order

Groupe de lecture: ecommerce.user. Groupe d'écriture: ecommerce.user.

ChampTypeClasse de donnéesDonnées personnellesGroupeVu par les agentsDescription
order_idref → ecommerce_ordernonenonecommerce.useren clairThe order the line belongs to
product_idref → productnonenonecommerce.useren clairThe product ordered
listing_idref → ecommerce_listingnonenonecommerce.useren clairThe shop listing the line was ordered from
descriptiontextnonenonecommerce.useren clairProduct text as it was when ordered
quantitynumbernonenonecommerce.useren clairUnits ordered
unit_pricemoneynonenonecommerce.useren clairPrice per unit including tax (minor currency units)
subtotalmoneynonenonecommerce.useren clairLine total (minor currency units, entered not computed)

Flux de travail ​

ecommerce_order ​

ActionTransitionQui peut l'exécuterApprobation
ecommerce_order.mark_paidstate: pending → paidecommerce.usernon
ecommerce_order.shipstate: paid → shippedecommerce.usernon
ecommerce_order.deliverstate: shipped → deliveredecommerce.usernon
ecommerce_order.cancelstate: pending → cancelledecommerce.usernon
ecommerce_order.refundstate: paid → refundedecommerce.manageroui
ecommerce_order.refund_deliveredstate: delivered → refundedecommerce.manageroui

Groupes de permissions ​

Groupes utilisés par cette application :

  • ecommerce.manager
  • ecommerce.user

Étapes d'approbation ​

Étapes qu'un agent ne peut que proposer :

  • ecommerce_order.refund
  • ecommerce_order.refund_delivered

Ce que les agents peuvent et ne peuvent pas faire ​

Un agent peut lire, rechercher, créer et modifier les enregistrements de cette application, et exécuter les actions qui ne requièrent pas d'approbation, dans les limites des groupes de permissions de son jeton.

Il ne peut que proposer ces étapes, qu'une personne doit approuver : 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.

Les données personnelles sont masquées sous forme de jetons de substitution : ecommerce_order.customer_email, ecommerce_order.customer_name, ecommerce_order.shipping_address, ecommerce_order.billing_address.

Ces champs ne sont pas communiqués aux agents : ecommerce_order.payment_reference, ecommerce_order.access_token.

Dépendances ​

  • base
  • product

Installation ​

Installez-la depuis l'application Customize (Place de marché), ou en ligne de commande :

bash
obop modules install-from ecommerce

Nécessite une base de données et des droits d'administrateur.

Créer la vôtre ​

Le guide des modules montre comment sont écrites les applications de ce type