shopping : A shopping cart¶
lino_xl.lib.shopping plugin adds a shopping cart, an addresses table
for delivery and invoicing addresses.
This is a tested document. The following instructions are used for initialization:
>>> import lino >>> lino.startup('lino_book.projects.min9.settings') >>> from django.utils import translation >>> from lino.api.doctest import * >>> from django.db.models import Q
- shopping cart¶
A database row representing the fact that a given user plans to buy a set of products. A shopping cart has one item per product for which the users has clicked "Add to cart". It also has an action to create an invoice.
- shopping address¶
A postal address that can be used either as invoicing address or delivery address.
Shopping addresses are not stored in
lino_xl.lib.contactsbecause they are private to each user and won't be used as business partners of the site operator.
- delivery method¶
A method to be used for delivery of a shopping cart.
The end user must set this before they can start an order (invoice) from their shopping cart.
The list of available delivery methods is to be maintained by the site manager.
The plugin does not yet add much demo data.
>>> rt.show('shopping.Addresses') No data to display
>>> rt.show('shopping.DeliveryMethods') ==== ================ ================== ================== ================ ID Designation Designation (de) Designation (fr) Product ---- ---------------- ------------------ ------------------ ---------------- 1 Parcel center Parcel center Parcel center Parcel center 2 Home using UPS Home using UPS Home using UPS Home using UPS 3 Take away Take away Take away Take away ==== ================ ================== ================== ================
- class lino_xl.lib.shopping.Cart¶
Django model used to represent a shopping cart.
The date of last modification.
The delivery address. A pointer to a shopping address of this user.
The invoicing address. A pointer to a shopping address of this user.
The invoice that has been created from this shopping cart. This field is empty as long as the user didn't yet run
- class lino_xl.lib.shopping.CartItem¶
Django model used to represent an item of a shopping cart.
- class lino_xl.lib.shopping.Address¶
Django model used to represent a shopping address.
- class lino_xl.lib.shopping.DeliverMethod¶
Django model used to represent a delivery method.