javereec / spree_customer_delivery_date

Customer can indicate on which day he wants the goods to be delivered

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpreeCustomerDeliveryDate

Allows for a customer to choose a date when he want the goods to be delivered. The field is stored on the order and it can be filled in, in the shipping phase of the checkout process. It uses pickadate.js to select the date.

Installation

Add spree_customer_delivery_date to your Gemfile:

gem 'spree_customer_delivery_date'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_customer_delivery_date:install

The extension adds following preferences to Spree::AppConfiguration

  • customer_delivery_date_enabled (true)
  • customer_delivery_date_lead_time (2)

You can override this in spree.rb initializer.

The lead time is expressed in days, business days. That's why we use the gem 'business_time'. This gem require a config file which can be generated.

bundle exec rails g business_time:config

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_customer_delivery_date/factories'

Copyright (c) 2014 Jan Vereecken, released under the New BSD License

About

Customer can indicate on which day he wants the goods to be delivered

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Ruby 85.1%Language:HTML 12.8%Language:JavaScript 1.2%Language:CSS 0.8%