Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (38 sloc) 3.717 kB
2eaea71 updated README
Jim Mulholland authored
1 # Squeejee Spree Multi-Site Extension
2188be9 main import
Robert Kuhr authored
2
578fb0a creating documentation
Robert Kuhr authored
3 The extension will allow you to setup multiple sites with one spree installation. It gives you the ability to have different domains that direct to different stores with different layouts. Orders, taxonomies and products will all be site specific entities now.
4
5 # Site Overview
6
7 To administer all of the sites go to `/admin/sites`. There you can create a site instance. Each site needs the following defined:
d0b9584 correction in docs
Robert Kuhr authored
8
578fb0a creating documentation
Robert Kuhr authored
9 1. **Name:** Each site needs a name defined for it. It is used purely for display purposes in the admin tool. It _can_ be used in a _layout_ template as well.
10
11 2. **Domain:** Each site requires a domain to tell which site it should display. So, if you want a site on _www.spreeshopping.com_ you would enter in that domain name here. It will identify the site regardless of what port number you are coming in on (_3000_ which is the default for the development, _80_ for http, and _443_ for https).
12
13 3. **Layout _(optional)_:** If you want a different layout for your site, you enter in the layout name here. Example: 'localhost' would look for the layout 'localhost.html.erb' in your `app/views/layout` directory. In addition, if nothing is provided, it will use the default 'application' layout.
14
15 # Admin Changes
16 In addition to having a new section in the admin to manage sites and their domain, a few more things have been added to the following sections.
17
18 1. **Taxonomies:** In the Taxonomies section, you will now see that they are associated with `Sites`. If you loaded the sample data you will see that they are associated with 'local'. You can change what site a taxonomy is associated with by editing the taxonomy. Click 'edit' on a taxonomy and you will have a drop-down now where you can associate which site the taxonomy is associated with. Only taxonomies that are associated with a site will display for that site
19
20 2. **Products:** If you select a product from the admin to edit you will now notice in the 'Product Details' section that the site name for a product is selected from a dropdown ('local' by default). Only products that are associated with a site will display in a site.
21
22 3. **Orders:** On the 'order listing' page, you will now see what site an order was placed on. If you click into the details of the order you will also see what site the order was placed on in the 'Order Details' section.
23
98fd55a Corrected more issues with filtering on current site; Updated README
Jim Mulholland authored
24 Note that sites are also now stored in a parent/child relationship using nested sets. With this, an admin of a parent site is able to see orders and products for their site and all child sites.
25
578fb0a creating documentation
Robert Kuhr authored
26 # Installation
27
d058737 Updated readme to require awesome_nested_set
Jim Mulholland authored
28 To install:
578fb0a creating documentation
Robert Kuhr authored
29 <pre>
d058737 Updated readme to require awesome_nested_set
Jim Mulholland authored
30 script/plugin install git://github.com/collectiveidea/awesome_nested_set.git
578fb0a creating documentation
Robert Kuhr authored
31 script/extension install git://github.com/tunagami/spree-multi-site.git
32 </pre>
33
34 If you haven't already "bootstrapped" the spree database, when you run the bootstrap rake task, all of the the schemas and sample data will be created/updated. If you just want to install the table schema and not use the sample data you can just run the rake task:
35 <pre>
36 rake db:migrate
37 </pre>
38 ...otherwise if you want to have all of the sample data along with the sample data, you can run these rake tasks:
39 <pre>
40 rake db:migrate
41 rake spree:extensions:multi_site:bootstrap_multi_site
42 </pre>
43
98fd55a Corrected more issues with filtering on current site; Updated README
Jim Mulholland authored
44 Update "config/spree_permissions" file with the following so that an top level admin can give admin access to users at lower level sites:
45
46 <pre>
47 'Admin::BaseController':
48 permission1:
49 roles : [admin]
50 options :
51 unless : "current_user.is_a?(User) and current_user.has_role?('admin_' + current_site.name)"
52 </pre>
53
578fb0a creating documentation
Robert Kuhr authored
54 # To Do's
2eaea71 updated README
Jim Mulholland authored
55 + Potentially allow products & taxonomies to be associated with multiple sites _(If this makes sense to do)_
Something went wrong with that request. Please try again.