The method "get_discount_for_checkout" in the Saleor's Discount model (voucher) is responsible for returning the discount amount that applies to a specific checkout. This method calculates and retrieves the discount based on the voucher's conditions and rules. It takes into account various factors such as the applied amount, the eligible products, and any restrictions or limitations specified in the voucher. The returned discount can then be applied to the total checkout amount to provide the applicable discount for the given checkout.
Python Voucher.get_discount_for_checkout - 15 examples found. These are the top rated real world Python examples of saleor.discount.models.Voucher.get_discount_for_checkout extracted from open source projects. You can rate examples to help us improve the quality of examples.