lfs-bulk-prices
Bulk prices for LFS: price tiers by quantity ("from 10 pieces 8.50 €").
- A price calculator,
BulkPricesCalculator, that picks the tier for the ordered amount. - A Bulk prices tab on the product management page, shown for products that use this calculator.
- Template tags and a small script for the product page that show the tiers and update the price when the customer changes the amount. lfs-theme includes them when the add-on is installed.
Installation
pip install lfs-bulk-prices # or, in lfs-project: uv sync --extra bulk-prices
# settings.py
INSTALLED_APPS = [..., "lfs_bulk_prices"]
LFS_PRICE_CALCULATORS = [
["lfs.gross_price.calculator.GrossPriceCalculator", _("Price includes tax")],
["lfs.net_price.calculator.NetPriceCalculator", _("Price excludes tax")],
["lfs_bulk_prices.calculator.BulkPricesCalculator", _("Bulk prices")],
]
# urls.py
urlpatterns += [path("bulk-prices/", include("lfs_bulk_prices.urls"))]
Then run python manage.py migrate. In the management interface choose the price calculator "Bulk prices" for a
product (or for the shop as default); the product then gets the Bulk prices tab.
Tests
pytest
The tests use lfs_bulk_prices.tests.settings and need django-lfs with its required add-ons installed.
License
BSD-3-Clause, see LICENSE.txt.
Metadata
Release files for lfs-bulk-prices 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lfs_bulk_prices-2.0.0.tar.gz | 15.7 kB | Without provenance | Details for lfs_bulk_prices-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lfs_bulk_prices-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for lfs_bulk_prices-2.0.0-py3-none-any.whl |
Total release size: 37.7 kB
Release files / lfs_bulk_prices-2.0.0.tar.gz
| Download URL | lfs_bulk_prices-2.0.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77bd4560d43a13adc30bc8388d7599444ea6800d5e990d6c27246a35b953bc1b
|
|
BLAKE2b-256 checksum How to use checksums |
4cdf41899a2778a27378cf7f3587c5fd4566a10473bcf978217a77f07848dd87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / lfs_bulk_prices-2.0.0-py3-none-any.whl
| Download URL | lfs_bulk_prices-2.0.0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9180c3ad3430ddf3d26a02db36c91822863bfb185a9a4f7450dba12b876c70ec
|
|
BLAKE2b-256 checksum How to use checksums |
f138cd77f97ef9af808c7a0018b8ab230d823fe486bd78cfff6381a550c61198
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for lfs-bulk-prices 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.