Skip to main content

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-starter: 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lfs-bulk-prices 2.0.1
File Size Uploaded Provenance Actions
lfs_bulk_prices-2.0.1.tar.gz 18.6 kB Without provenance Details for lfs_bulk_prices-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lfs-bulk-prices 2.0.1
File Interpreter ABI Platform Actions
lfs_bulk_prices-2.0.1-py3-none-any.whl Python 3 none any Details for lfs_bulk_prices-2.0.1-py3-none-any.whl

Total release size: 44.8 kB

Release files / lfs_bulk_prices-2.0.1.tar.gz

Download URL lfs_bulk_prices-2.0.1.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8382261f45d67842c8f11e36128d79f8eb8a72d643f278cbef98b0f381e91d05
BLAKE2b-256 checksum
How to use checksums
bc7681150b1bc55dd646e6c2bd993a14e92116ff9caeec7051bc20e105bb03a5
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.1-py3-none-any.whl

Download URL lfs_bulk_prices-2.0.1-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c80ca090c5113264ab7f869dabf222c77810c870922af1d48f2cc6b5bb3b5046
BLAKE2b-256 checksum
How to use checksums
3720dca577c9c1d736434547299f805714bf7559ebb11c2f326c6521223662dc
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.1

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.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page