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
- Host: GitHub
- URL: https://github.com/madetech/solidus_multi_domain_enhancements
- Owner: madetech
- License: bsd-3-clause
- Created: 2016-04-19T14:39:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T15:39:46.000Z (about 8 years ago)
- Last Synced: 2025-01-25T14:11:44.653Z (over 1 year ago)
- Language: Ruby
- Size: 60.5 KB
- Stars: 0
- Watchers: 42
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Solidus Multi Domain Enhancements
==============================
[](https://travis-ci.org/madetech/solidus_multi_domain_enhancements) [](https://codeclimate.com/github/madetech/solidus_multi_domain_enhancements) [](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