Metadata-Version: 2.4
Name: ocyan.plugin.oscar_delivery_date
Version: 2.0.1rc1
Summary: Delivery-date selection for Oscar checkout.
Author-email: Mandel <info@mandelblog.com>
License-Expression: LicenseRef-Proprietary
Classifier: Framework :: Ocyan
Classifier: Environment :: Plugins
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
Requires-Dist: ocyan.core<2,>=1.2.13
Requires-Dist: django<5.3,>=5.2
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-django; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: ruff; extra == "test"
Requires-Dist: build; extra == "test"

Ocyan plugin - Oscar Delivery Date
================================

Installation
-------------
Add `ocyan.plugin.oscar_delivery_date` to your projects dependencies.


About & Usage of Oscar Delivery Date
------------------------------------
A delivery date form in the checkout page with(optional) time choices.


Configuration
-------------
### Setting you can configure in site settings
- delivery_time_days
    - Upper limit of standard delivery time in days - Sets a minimum date to pick. Eg: Today is 1 december and you set minimum to 2, then the first date available to pick in the datefield selector is 3 december.

    Note: If you do not enter a value here, it will default to 1.

### Settings you can configure in your settings.py of the project you're working on
- DELIVERY_TIME_CHOICES
    - This has to be configured inside settings.py instead of config.json because here you can translate whatever you enter. 

    Example setting:
    ```python
        from django.utils.translation import gettext_lazy as _
        DELIVERY_TIME_CHOICES = (
            ("No preference", _("No preference")),
            ("Morning", _("Morning")),
            ("Afternoon", _("Afternoon")),
            ("Evening", _("Evening")),
        )
    ```

    The first string in each tuple is the code and the second string is what the user sees.

### Settings you can configure in your config.json of the project you're working on

- default_disabled_days
    - Most delivery services do not ship on sunday, but some do. With this setting you can disable days by default. You do this by it's number:

        0 = Sunday
        1 = Monday
        2 = Tuesday
        3 = Wednesday
        4 = Thursday
        5 = Friday
        6 = Saturday

Example: 

```json
"oscar_delivery_date": {
    "default_disabled_days": [0,6],
}
```
