https://github.com/fostercommerce/delivery-dates
https://github.com/fostercommerce/delivery-dates
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fostercommerce/delivery-dates
- Owner: FosterCommerce
- License: mit
- Created: 2019-04-12T14:15:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T13:48:19.000Z (about 7 years ago)
- Last Synced: 2024-04-27T01:41:03.104Z (about 2 years ago)
- Language: PHP
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Delivery Dates plugin for Craft CMS 3.1.x and Craft Commerce 2.x
Delivery Dates
## Installation
To install the plugin, follow these instructions.
1. Open your terminal and go to your Craft project:
cd /path/to/project
2. Then tell Composer to load the plugin:
composer require FosterCommerce/delivery-dates
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Delivery Dates.
## Template Usage
```twig
{% set deliveryBy = craft.deliveryDates.deliveryBy %}
Order by {{deliveryBy.orderByDate|date('m/d/Y H:i:s')}}{# 4/19/2019 14:00:00 #}
Delivery By {{deliveryBy.deliveryDate|date('m/d/Y')}} {# 4/19/2019 #}
```
```twig
{% set deliveryBy = craft.deliveryDates.deliveryBy(order.dateOrdered) %}
Order by {{deliveryBy.orderByDate|date('m/d/Y H:i:s')}}{# 4/29/2019 09:00:00 #}
Delivery By {{deliveryBy.deliveryDate|date('m/d/Y')}} {# 5/2/2019 #}
```
Brought to you by [Foster Commerce](https://fostercommerce.com)