spree_storefront 5.3.0.rc2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +188 -0
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ca6a0cc0be5497b276ee8865a4bba76029c4c2c427ec07d74365562f434afa1
|
|
4
|
+
data.tar.gz: 3373328f5e35d0c7b42ba78f52770d6814b6b5363bd1a06b7bce9ca6861caf50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b995bfe742643a46f51b1bd1ce6250280777b6b7aa58e7f5255c6b7488222f403aa09630fbf57de94342abfd25faf8e85ecd8a80e4893921ff2e54957d873495
|
|
7
|
+
data.tar.gz: 3bbae62180526326f7aac1891c44843a14fa32b2a626f0160a2128a22f0d7420239b666be03a3820030e5ae35e88d9bbb7f55686ef0c9284bc0b0022f8f029a4
|
data/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Spree Storefront
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/rb/spree_storefront)
|
|
4
|
+
|
|
5
|
+
Spree Storefront provides a modern, fully-featured Rails-based storefront for Spree Commerce with a responsive design and optimized shopping experience.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This gem includes:
|
|
10
|
+
|
|
11
|
+
- **Product Catalog** - Browsing, filtering, and search
|
|
12
|
+
- **Shopping Cart** - Full cart management with guest and authenticated checkout
|
|
13
|
+
- **Checkout Flow** - Multi-step checkout with address, shipping, and payment
|
|
14
|
+
- **Customer Accounts** - Registration, login, order history, wishlists
|
|
15
|
+
- **Page Builder Integration** - Custom landing pages and content
|
|
16
|
+
- **SEO Optimization** - Meta tags, structured data, and sitemap support
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bundle add spree_storefront
|
|
22
|
+
bin/rails g spree:storefront:install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
### Product Catalog
|
|
28
|
+
|
|
29
|
+
- Product listing with pagination
|
|
30
|
+
- Category and taxonomy navigation
|
|
31
|
+
- Faceted search and filtering
|
|
32
|
+
- Product variants and options
|
|
33
|
+
- Image galleries
|
|
34
|
+
- Related products
|
|
35
|
+
|
|
36
|
+
### Shopping Cart
|
|
37
|
+
|
|
38
|
+
- Add/remove items
|
|
39
|
+
- Update quantities
|
|
40
|
+
- Apply coupon codes
|
|
41
|
+
- Guest cart persistence
|
|
42
|
+
- Cart merge on login
|
|
43
|
+
|
|
44
|
+
### Checkout
|
|
45
|
+
|
|
46
|
+
- Address management (billing/shipping)
|
|
47
|
+
- Shipping method selection
|
|
48
|
+
- Payment processing
|
|
49
|
+
- Order review and confirmation
|
|
50
|
+
- Guest checkout support
|
|
51
|
+
|
|
52
|
+
### Customer Accounts
|
|
53
|
+
|
|
54
|
+
- Registration and authentication
|
|
55
|
+
- Order history
|
|
56
|
+
- Address book
|
|
57
|
+
- Wishlists
|
|
58
|
+
- Account settings
|
|
59
|
+
|
|
60
|
+
## Technology Stack
|
|
61
|
+
|
|
62
|
+
- **Tailwind CSS** - Responsive, mobile-first design
|
|
63
|
+
- **Turbo/Hotwire** - Fast, SPA-like navigation
|
|
64
|
+
- **Stimulus** - JavaScript controllers for interactivity
|
|
65
|
+
- **Heroicons** - Icon library
|
|
66
|
+
|
|
67
|
+
## Customization
|
|
68
|
+
|
|
69
|
+
### Overriding Views
|
|
70
|
+
|
|
71
|
+
Copy views to customize the storefront appearance:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Copy all storefront views
|
|
75
|
+
cp -r $(bundle show spree_storefront)/app/views/spree app/views/
|
|
76
|
+
|
|
77
|
+
# Or copy specific templates
|
|
78
|
+
cp $(bundle show spree_storefront)/app/views/spree/products/show.html.erb \
|
|
79
|
+
app/views/spree/products/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Styling
|
|
83
|
+
|
|
84
|
+
Customize Tailwind configuration:
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
// tailwind.config.js
|
|
88
|
+
module.exports = {
|
|
89
|
+
content: [
|
|
90
|
+
// Include Spree Storefront views
|
|
91
|
+
`${process.env.GEM_HOME}/gems/spree_storefront-*/app/views/**/*.erb`,
|
|
92
|
+
'./app/views/**/*.erb',
|
|
93
|
+
'./app/helpers/**/*.rb',
|
|
94
|
+
'./app/javascript/**/*.js'
|
|
95
|
+
],
|
|
96
|
+
theme: {
|
|
97
|
+
extend: {
|
|
98
|
+
colors: {
|
|
99
|
+
primary: '#your-brand-color'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Controllers
|
|
107
|
+
|
|
108
|
+
Extend storefront controllers for custom behavior:
|
|
109
|
+
|
|
110
|
+
```ruby
|
|
111
|
+
# app/controllers/spree/products_controller_decorator.rb
|
|
112
|
+
module Spree
|
|
113
|
+
module ProductsControllerDecorator
|
|
114
|
+
def show
|
|
115
|
+
super
|
|
116
|
+
@related_products = @product.related_products.limit(4)
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
Spree::ProductsController.prepend(Spree::ProductsControllerDecorator)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Helpers
|
|
125
|
+
|
|
126
|
+
Add custom helpers for view logic:
|
|
127
|
+
|
|
128
|
+
```ruby
|
|
129
|
+
# app/helpers/spree/products_helper_decorator.rb
|
|
130
|
+
module Spree
|
|
131
|
+
module ProductsHelperDecorator
|
|
132
|
+
def product_badge(product)
|
|
133
|
+
return unless product.on_sale?
|
|
134
|
+
content_tag(:span, 'Sale', class: 'badge badge-sale')
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
Spree::ProductsHelper.prepend(Spree::ProductsHelperDecorator)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Routes
|
|
143
|
+
|
|
144
|
+
Storefront routes are mounted automatically. Customize in your routes file:
|
|
145
|
+
|
|
146
|
+
```ruby
|
|
147
|
+
# config/routes.rb
|
|
148
|
+
Rails.application.routes.draw do
|
|
149
|
+
# Custom routes before Spree
|
|
150
|
+
get '/shop', to: redirect('/products')
|
|
151
|
+
|
|
152
|
+
# Spree routes
|
|
153
|
+
mount Spree::Core::Engine, at: '/'
|
|
154
|
+
end
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Testing
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
cd storefront
|
|
161
|
+
bundle exec rake test_app # First time only
|
|
162
|
+
bundle exec rspec
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Page Builder Integration
|
|
166
|
+
|
|
167
|
+
The storefront integrates with Spree Page Builder for custom pages:
|
|
168
|
+
|
|
169
|
+
```ruby
|
|
170
|
+
# Custom page sections are automatically rendered
|
|
171
|
+
# Configure in admin under Content > Pages
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Documentation
|
|
175
|
+
|
|
176
|
+
- [Storefront Customization](https://docs.spreecommerce.org/developer/customization/storefront)
|
|
177
|
+
- [Theming Guide](https://docs.spreecommerce.org/developer/customization/theming)
|
|
178
|
+
- [Page Builder](https://docs.spreecommerce.org/developer/page-builder)
|
|
179
|
+
|
|
180
|
+
## Headless Alternative
|
|
181
|
+
|
|
182
|
+
For custom frontends (React, Vue, Next.js), use `spree_api` without `spree_storefront`:
|
|
183
|
+
|
|
184
|
+
```ruby
|
|
185
|
+
# Headless setup
|
|
186
|
+
gem 'spree' # Core + API
|
|
187
|
+
gem 'spree_admin' # Admin dashboard only
|
|
188
|
+
```
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_storefront
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.3.0
|
|
4
|
+
version: 5.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
@@ -15,28 +15,28 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 5.3.0
|
|
18
|
+
version: 5.3.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 5.3.0
|
|
25
|
+
version: 5.3.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: spree_page_builder
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 5.3.0
|
|
32
|
+
version: 5.3.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 5.3.0
|
|
39
|
+
version: 5.3.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: active_link_to
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -198,6 +198,7 @@ extensions: []
|
|
|
198
198
|
extra_rdoc_files: []
|
|
199
199
|
files:
|
|
200
200
|
- LICENSE.md
|
|
201
|
+
- README.md
|
|
201
202
|
- Rakefile
|
|
202
203
|
- app/assets/config/spree_storefront_manifest.js
|
|
203
204
|
- app/assets/stylesheets/storefront_page_builder.css
|
|
@@ -587,9 +588,9 @@ licenses:
|
|
|
587
588
|
- AGPL-3.0-or-later
|
|
588
589
|
metadata:
|
|
589
590
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
590
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.3.0
|
|
591
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.3.0
|
|
591
592
|
documentation_uri: https://docs.spreecommerce.org/
|
|
592
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.3.0
|
|
593
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.3.0
|
|
593
594
|
rdoc_options: []
|
|
594
595
|
require_paths:
|
|
595
596
|
- lib
|