eCommerce

Sklep internetowy

MarketplaceOperacjeWersja 0.2.0manifest

Do czego służy ​

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.

Co pakiet robi, a czego nie robi ​

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.

Modele ​

ecommerce_category ​

A group of listings shown together in the shop

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
nametextnonenieecommerce.userjawnieCategory name shown in the shop
slugtextnonenieecommerce.userjawnieURL part of the category, lowercase with dashes
descriptiontextnonenieecommerce.userjawnieShort text about the category
sequencenumbernonenieecommerce.userjawnieOrder among categories, lowest first
publishedboolnonenieecommerce.userjawnieWhether the category is visible to shoppers

ecommerce_listing ​

A product as it appears in the online shop

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
product_idref → productnonenieecommerce.userjawnieThe product being sold online
titletextnonenieecommerce.userjawnieTitle shown in the shop
slugtextnonenieecommerce.userjawnieURL part of the product page, lowercase with dashes
summarytextnonenieecommerce.userjawnieOne or two sentences shown on product cards
descriptionlongtextnonenieecommerce.userjawnieDescription shown on the product page, in Markdown
category_idref → ecommerce_categorynonenieecommerce.userjawnieThe category the listing is shown under
pricemoneynonenieecommerce.userjawnieShop price including tax (minor currency units, e.g. cents)
compare_at_pricemoneynonenieecommerce.userjawniePrevious price shown crossed out (minor currency units)
currencytextnonenieecommerce.userjawnieISO 4217 currency code of the prices, for example EUR; empty means the shop currency from the instance settings
skutextnonenieecommerce.userjawnieStock keeping unit shown on the product page
stock_policyselect (always_available, block_when_out, allow_backorder)nonenieecommerce.userjawnieWhat happens when stock runs out: always_available, block_when_out, allow_backorder
stock_quantitynumbernonenieecommerce.userjawnieUnits on hand, used with the stock policy. Orders do not reduce it: adjust it by hand
publishedboolnonenieecommerce.userjawnieWhether the listing is visible to shoppers

ecommerce_listing_translation ​

A listing translated into another language

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
listing_idref → ecommerce_listingnonenieecommerce.userjawnieThe listing this translates
langselect (en, de, fr, pl, fi, sv, es)nonenieecommerce.userjawnieLanguage of the translation: en, de, fr, pl, fi, sv or es
titletextnonenieecommerce.userjawnieTranslated title
summarytextnonenieecommerce.userjawnieTranslated card text
descriptionlongtextnonenieecommerce.userjawnieTranslated description in Markdown
publishedboolnonenieecommerce.userjawnieWhether the translation is shown; it is only reachable while its listing is published

ecommerce_shipping_method ​

A way of delivering orders with its price

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
nametextnonenieecommerce.userjawnieName shown at checkout, for example Standard delivery
carriertextnonenieecommerce.userjawnieCarrier that delivers, for example DHL
pricemoneynonenieecommerce.userjawnieDelivery price (minor currency units)
free_overmoneynonenieecommerce.userjawnieOrder total above which delivery is free (minor currency units); empty means never
delivery_daysnumbernonenieecommerce.userjawnieUsual number of days until delivery
activeboolnonenieecommerce.userjawnieWhether shoppers can choose it

ecommerce_discount_code ​

A code a shopper enters at checkout for a reduction

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.manager.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
codetextnonenieecommerce.userjawnieThe code shoppers type, for example SPRING10
kindselect (percent, fixed)nonenieecommerce.userjawnieType of reduction: percent or fixed
valuenumbernonenieecommerce.userjawnieReduction: basis points for percent (1000 is 10.00 percent), minor currency units for fixed
starts_ondatenonenieecommerce.userjawnieFirst day the code works (YYYY-MM-DD)
ends_ondatenonenieecommerce.userjawnieLast day the code works (YYYY-MM-DD)
max_usesnumbernonenieecommerce.userjawnieHow many times the code may be used in total; empty means unlimited
used_countnumbernonenieecommerce.userjawnieHow many times it has been used (kept up to date by hand)
minimum_ordermoneynonenieecommerce.userjawnieSmallest order total the code applies to (minor currency units)
activeboolnonenieecommerce.userjawnieWhether the code can be used

ecommerce_order ​

An order placed online

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
numbertextnonenieecommerce.userjawnieOrder number shown to the shopper. Free text: packages cannot generate sequences; the public checkout makes a random one
customer_emailtextinternaltakecommerce.userzamaskowaneEmail address of the shopper
customer_nametextinternaltakecommerce.userzamaskowaneName of the shopper
customer_idref → partynonenieecommerce.userjawnieThe matching contact, once the shopper is known
shipping_addresslongtextinternaltakecommerce.userzamaskowaneDelivery address
billing_addresslongtextinternaltakecommerce.userzamaskowaneBilling address when different from delivery
shipping_method_idref → ecommerce_shipping_methodnonenieecommerce.userjawnieThe chosen way of delivery
discount_code_idref → ecommerce_discount_codenonenieecommerce.userjawnieThe discount code used, if any
placed_ondatenonenieecommerce.userjawnieDay the order was placed (YYYY-MM-DD)
currencytextnonenieecommerce.userjawnieISO 4217 currency code, for example EUR
subtotalmoneynonenieecommerce.userjawnieSum of the lines (minor currency units, entered not computed)
discount_totalmoneynonenieecommerce.userjawnieReduction from the discount code (minor currency units)
shipping_totalmoneynonenieecommerce.userjawnieDelivery charge (minor currency units)
tax_totalmoneynonenieecommerce.userjawnieTax included in the total (minor currency units)
totalmoneynonenieecommerce.userjawnieAmount the shopper pays (minor currency units)
payment_referencetextfinancialtakecommerce.userwstrzymaneReference from the payment provider; never a card number
tracking_referencetextnonenieecommerce.userjawnieCarrier tracking number
access_tokentextsecretnieecommerce.userwstrzymaneSecret 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)nonenieecommerce.userjawnieFulfilment status: pending, paid, shipped, delivered, cancelled, refunded

ecommerce_order_line ​

One product line of a web order

Grupa odczytu: ecommerce.user. Grupa zapisu: ecommerce.user.

PoleRodzajKlasa danychDane osoboweGrupaAgenci widząOpis
order_idref → ecommerce_ordernonenieecommerce.userjawnieThe order the line belongs to
product_idref → productnonenieecommerce.userjawnieThe product ordered
listing_idref → ecommerce_listingnonenieecommerce.userjawnieThe shop listing the line was ordered from
descriptiontextnonenieecommerce.userjawnieProduct text as it was when ordered
quantitynumbernonenieecommerce.userjawnieUnits ordered
unit_pricemoneynonenieecommerce.userjawniePrice per unit including tax (minor currency units)
subtotalmoneynonenieecommerce.userjawnieLine total (minor currency units, entered not computed)

Przepływy pracy ​

ecommerce_order ​

AkcjaPrzenosiKto może uruchomićZatwierdzenie
ecommerce_order.mark_paidstate: pending → paidecommerce.usernie
ecommerce_order.shipstate: paid → shippedecommerce.usernie
ecommerce_order.deliverstate: shipped → deliveredecommerce.usernie
ecommerce_order.cancelstate: pending → cancelledecommerce.usernie
ecommerce_order.refundstate: paid → refundedecommerce.managertak
ecommerce_order.refund_deliveredstate: delivered → refundedecommerce.managertak

Grupy uprawnień ​

Grupy używane przez tę aplikację:

  • ecommerce.manager
  • ecommerce.user

Kroki zatwierdzania ​

Kroki, które agent może tylko zaproponować:

  • ecommerce_order.refund
  • ecommerce_order.refund_delivered

Co agenci mogą, a czego nie mogą ​

Agent może odczytywać, wyszukiwać, tworzyć i aktualizować rekordy tej aplikacji oraz uruchamiać akcje niewymagające zatwierdzenia, w ramach grup uprawnień swojego tokenu.

Te kroki może tylko zaproponować, a człowiek musi je zatwierdzić: 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.

Dane osobowe są maskowane jako tokeny zastępcze: ecommerce_order.customer_email, ecommerce_order.customer_name, ecommerce_order.shipping_address, ecommerce_order.billing_address.

Te pola są całkowicie wstrzymane i niedostępne dla agentów: ecommerce_order.payment_reference, ecommerce_order.access_token.

Zależności ​

  • base
  • product

Instalacja ​

Zainstaluj ją w aplikacji Customize (Marketplace) lub z wiersza poleceń:

bash
obop modules install-from ecommerce

Wymaga bazy danych i uprawnień administratora.

Zbuduj własną ​

Przewodnik po modułach pokazuje, jak pisze się takie aplikacje