An open API service indexing awesome lists of open source software.

https://github.com/madetech/solidus_multi_domain_enhancements

Additional Attributes for Solidus Multi Domain stores
https://github.com/madetech/solidus_multi_domain_enhancements

Last synced: about 1 month ago
JSON representation

Additional Attributes for Solidus Multi Domain stores

Awesome Lists containing this project

README

          

Solidus Multi Domain Enhancements
==============================

[![Build Status](https://travis-ci.org/madetech/solidus_multi_domain_enhancements.svg?branch=master)](https://travis-ci.org/madetech/solidus_multi_domain_enhancements) [![Code Climate](https://codeclimate.com/github/madetech/solidus_multi_domain_enhancements/badges/gpa.svg)](https://codeclimate.com/github/madetech/solidus_multi_domain_enhancements) [![Test Coverage](https://codeclimate.com/github/madetech/solidus_multi_domain_enhancements/badges/coverage.svg)](https://codeclimate.com/github/madetech/solidus_multi_domain_enhancements/coverage)

Adds additional attributes to the core Store model.

Provides theses additional attributes:

- `timezone`
- `order_number_prefix`
- `default_locale`
- `currency_symbol_before`

Adds additional attributes to the core Order model.

- `locale` - which is set using the current I18n.locale during checkout

Installation
------------

Add solidus_multi_domain_enhancements to your Gemfile:

```ruby
gem 'solidus_multi_domain_enhancements'
```

Bundle your dependencies and run the installation generator:

```shell
bundle
bundle exec rails g solidus_multi_domain_enhancements:install
```

Configuration
-------------
The default values for `timezone`, and `order_number_prefix` are preferences which are by default are set to:

| Preference | Default |
|-----------------------|---------------|
| `timezone` | Europe/London |
| `order_number_prefix` | R |

To override these defaults set `Spree::MultiDomainConfig[:timezone]` and `Spree::MultiDomainConfig[:order_number_prefix]` in `config/initializers/spree.rb`

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, and [Rubocop](https://github.com/bbatsov/rubocop) static code analysis. The dummy app can be regenerated by using `rake test_app`.

```shell
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:

```ruby
require 'solidus_multi_domain_enhancements/factories'
```

Copyright (c) 2016 [Made Tech](https://www.madetech.com), released under the New BSD License