solidus_liquid 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +10 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/Guardfile +37 -0
- data/LICENSE.txt +21 -0
- data/README.md +84 -0
- data/Rakefile +35 -0
- data/app/controllers/concerns/solidus_liquid/liquid.rb +26 -0
- data/app/controllers/solidus_liquid/addresses_controller.rb +15 -0
- data/app/controllers/solidus_liquid/carts_controller.rb +15 -0
- data/app/controllers/solidus_liquid/collections_controller.rb +22 -0
- data/app/controllers/solidus_liquid/customers_controller.rb +16 -0
- data/app/controllers/solidus_liquid/home_controller.rb +15 -0
- data/app/controllers/solidus_liquid/liquid_controller.rb +25 -0
- data/app/controllers/solidus_liquid/orders_controller.rb +18 -0
- data/app/controllers/solidus_liquid/pages_controller.rb +22 -0
- data/app/controllers/solidus_liquid/products_controller.rb +30 -0
- data/app/controllers/solidus_liquid/registrations_controller.rb +25 -0
- data/app/controllers/solidus_liquid/responders/solidus_liquid/liquid_responder.rb +29 -0
- data/app/controllers/solidus_liquid/search_controller.rb +41 -0
- data/app/controllers/solidus_liquid/sessions_controller.rb +15 -0
- data/app/drops/rails_settings/scoped_settings_drop.rb +11 -0
- data/app/drops/solidus_liquid/errors_drop.rb +14 -0
- data/app/drops/solidus_liquid/link_drop.rb +15 -0
- data/app/drops/solidus_liquid/link_list_drop.rb +7 -0
- data/app/drops/solidus_liquid/nil_drop.rb +7 -0
- data/app/drops/solidus_liquid/page_drop.rb +7 -0
- data/app/drops/solidus_liquid/search_drop.rb +7 -0
- data/app/drops/spree/address_drop.rb +24 -0
- data/app/drops/spree/image_drop.rb +10 -0
- data/app/drops/spree/line_item_drop.rb +5 -0
- data/app/drops/spree/option_type_drop.rb +4 -0
- data/app/drops/spree/order_drop.rb +18 -0
- data/app/drops/spree/product_drop.rb +92 -0
- data/app/drops/spree/taxon_drop.rb +31 -0
- data/app/drops/spree/user_drop.rb +19 -0
- data/app/drops/spree/variant_drop.rb +80 -0
- data/app/filters/solidus_liquid/additional_filters.rb +22 -0
- data/app/filters/solidus_liquid/html_filters.rb +20 -0
- data/app/filters/solidus_liquid/money_filters.rb +15 -0
- data/app/filters/solidus_liquid/string_filters.rb +11 -0
- data/app/filters/solidus_liquid/url_filters.rb +55 -0
- data/app/helpers/solidus_liquid/liquid_helper.rb +107 -0
- data/app/helpers/solidus_liquid/shop_helper.rb +7 -0
- data/app/models/concerns/solidus_liquid/address.rb +15 -0
- data/app/models/concerns/solidus_liquid/full_name.rb +11 -0
- data/app/models/concerns/solidus_liquid/handle.rb +25 -0
- data/app/models/concerns/solidus_liquid/inventory_policy.rb +7 -0
- data/app/models/solidus_liquid/asset.rb +12 -0
- data/app/models/solidus_liquid/link.rb +10 -0
- data/app/models/solidus_liquid/link_list.rb +7 -0
- data/app/models/solidus_liquid/page.rb +5 -0
- data/app/models/solidus_liquid/setting.rb +8 -0
- data/app/models/solidus_liquid/theme.rb +19 -0
- data/app/models/spree/address_decorator.rb +20 -0
- data/app/models/spree/image_decorator.rb +19 -0
- data/app/models/spree/product_decorator.rb +14 -0
- data/app/models/spree/taxon_decorator.rb +5 -0
- data/app/models/spree/variant_decorator.rb +15 -0
- data/app/poro/solidus_liquid/search.rb +14 -0
- data/app/services/solidus_liquid/app_specific_string_io.rb +15 -0
- data/app/services/solidus_liquid/asset_compiler.rb +11 -0
- data/app/services/solidus_liquid/asset_postprocessor.rb +53 -0
- data/app/services/solidus_liquid/link_list_seeder.rb +26 -0
- data/app/services/solidus_liquid/liquid_asset_compiler.rb +19 -0
- data/app/services/solidus_liquid/scss_asset_compiler.rb +15 -0
- data/app/services/solidus_liquid/shop_settings_seeder.rb +26 -0
- data/app/services/solidus_liquid/theme_mechanic.rb +45 -0
- data/app/uploaders/solidus_liquid/asset_uploader.rb +10 -0
- data/app/views/solidus_liquid/global/content_for_header.html.erb +0 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/README.md +54 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/assets/arrow-down.svg.liquid +3 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/assets/cart.svg.liquid +4 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/assets/shop.js.liquid +75 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/assets/shopify_common.js +14 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/assets/style.scss.liquid +768 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/config/settings.html +217 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/config/settings_data.json +26 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/layout/theme.liquid +181 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/article-grid-item.liquid +73 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/collection-grid-item.liquid +46 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/collection-listing.liquid +46 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/open-graph-tags.liquid +35 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/product-grid-item.liquid +70 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/site-nav.liquid +57 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/social-links.liquid +42 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/snippets/twitter-card.liquid +41 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/404.liquid +2 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/article.liquid +160 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/blog.grid.liquid +30 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/blog.liquid +92 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/cart.liquid +123 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/collection.liquid +102 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/account.liquid +57 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/activate_account.liquid +26 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/addresses.liquid +173 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/login.liquid +90 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/order.liquid +103 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/register.liquid +32 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/reset_password.liquid +27 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/index.liquid +39 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/list-collections.liquid +19 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/page.liquid +16 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/product.liquid +202 -0
- data/app/views/solidus_liquid/themes/skeleton-theme/templates/search.liquid +72 -0
- data/bin/rails +12 -0
- data/config/app.yml +0 -0
- data/config/initializers/carrierwave.rb +25 -0
- data/config/initializers/devise.rb +286 -0
- data/config/initializers/form_tag.rb +43 -0
- data/config/initializers/liquid.rb +202 -0
- data/config/initializers/sass.rb +15 -0
- data/config/initializers/theme_settings.rb +29 -0
- data/config/routes.rb +48 -0
- data/db/migrate/20170223064316_create_solidus_liquid_assets.solidus_liquid.rb +14 -0
- data/db/migrate/20170223064317_create_solidus_liquid_themes.solidus_liquid.rb +10 -0
- data/db/migrate/20170223064318_create_solidus_liquid_link_lists.solidus_liquid.rb +12 -0
- data/db/migrate/20170223064319_create_solidus_liquid_links.solidus_liquid.rb +13 -0
- data/db/migrate/20170223064320_create_solidus_liquid_settings.solidus_liquid.rb +22 -0
- data/db/migrate/20170223064321_create_solidus_liquid_pages.solidus_liquid.rb +16 -0
- data/db/migrate/20170223064322_add_attributes_to_spree_users.solidus_liquid.rb +7 -0
- data/db/migrate/20170223064323_add_handle_to_spree_taxons.solidus_liquid.rb +7 -0
- data/lib/generators/solidus_liquid/install/install_generator.rb +13 -0
- data/lib/solidus_liquid.rb +11 -0
- data/lib/solidus_liquid/configuration.rb +21 -0
- data/lib/solidus_liquid/engine.rb +24 -0
- data/lib/solidus_liquid/factories.rb +7 -0
- data/lib/solidus_liquid/version.rb +3 -0
- data/lib/tasks/download_theme.rake +18 -0
- data/lib/tasks/seed_default_theme.rake +8 -0
- data/lib/tasks/seed_everything.rake +14 -0
- data/lib/tasks/seed_link_list.rake +8 -0
- data/lib/tasks/seed_shop_settings.rake +8 -0
- data/solidus_liquid.gemspec +56 -0
- metadata +586 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
{% assign products_per_page = settings.products_per_row | times: settings.number_of_rows %}
|
2
|
+
{% assign numbers = 'one, two, three, four, five, six' | split: ',' %}
|
3
|
+
{% assign products_per_row = settings.products_per_row | minus: 1 %}
|
4
|
+
{% assign products_per_row = numbers[products_per_row] | strip | append: '-per-row' %}
|
5
|
+
|
6
|
+
{% paginate blog.articles by products_per_page %}
|
7
|
+
|
8
|
+
{% if current_tags %}
|
9
|
+
<h1 class="delta">{{ blog.title | link_to: blog.url }} <span class="quiet">»</span> {{ current_tags.first }}</h1>
|
10
|
+
{% else %}
|
11
|
+
<h1 class="delta">{{ blog.title }}</h1>
|
12
|
+
{% endif %}
|
13
|
+
|
14
|
+
<ul class="grid clearfix">
|
15
|
+
{% for article in blog.articles %}
|
16
|
+
{% include 'article-grid-item' with products_per_row %}
|
17
|
+
{% endfor %}
|
18
|
+
</ul>
|
19
|
+
|
20
|
+
{% if paginate.pages > 1 %}
|
21
|
+
<div class="pagination">
|
22
|
+
{% comment %}
|
23
|
+
When paginating blog articles, a previous article is actually a newer article, not an older one,
|
24
|
+
because blog articles are shown and paginated in a reversed chronological order.
|
25
|
+
The word 'previous' can be confusing, hence we'll change it.
|
26
|
+
{% endcomment %}
|
27
|
+
{{ paginate | default_pagination | replace: 'Previous', 'Newer articles' | replace: 'Next', 'Older articles' }}
|
28
|
+
{% endif %}
|
29
|
+
|
30
|
+
{% endpaginate %}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
{% paginate blog.articles by 5 %}
|
2
|
+
|
3
|
+
{% if current_tags %}
|
4
|
+
<h1 class="delta">{{ blog.title | link_to: blog.url }} <span class="quiet">»</span> {{ current_tags.first }}</h1>
|
5
|
+
{% else %}
|
6
|
+
<h1 class="delta">{{ blog.title }}</h1>
|
7
|
+
{% endif %}
|
8
|
+
|
9
|
+
<div class="articles">
|
10
|
+
|
11
|
+
{% for article in blog.articles %}
|
12
|
+
|
13
|
+
{% comment %}
|
14
|
+
Let's extract a blog image.
|
15
|
+
We will look for an image in the excerpt first, and in the blog post itself second.
|
16
|
+
We will remove the image suffix to grab as big an image as we can.
|
17
|
+
{% endcomment %}
|
18
|
+
|
19
|
+
{% assign article_has_image = false %}
|
20
|
+
{% assign img_tag = '<' | append: 'img' %}
|
21
|
+
{% if article.excerpt_or_content contains img_tag %}
|
22
|
+
{% assign src = article.excerpt_or_content | split: 'src="' %}
|
23
|
+
{% assign src = src[1] | split: '"' | first %}
|
24
|
+
{% if src %}
|
25
|
+
{% assign article_has_image = true %}
|
26
|
+
{% assign image_src = src | replace: '_small', '' | replace: '_compact', '' | replace: '_medium', '' | replace: '_large', '' | replace: '_grande', '' %}
|
27
|
+
{% endif %}
|
28
|
+
{% endif %}
|
29
|
+
|
30
|
+
<div class="article{% if forloop.first %} first{% endif %}{% if forloop.last %} last{% endif %} clear">
|
31
|
+
<h2 class="title">
|
32
|
+
<a href="{{ article.url }}">{{ article.title }}</a>
|
33
|
+
</h2>
|
34
|
+
<h3 class="date">
|
35
|
+
<time pubdate datetime="{{ article.published_at | date: '%Y-%m-%d' }}">{{ article.published_at | date: '%b %d, %Y' }}</time>
|
36
|
+
</h3>
|
37
|
+
<div class="row">
|
38
|
+
{% if article_has_image %}
|
39
|
+
<div class="third column">
|
40
|
+
<a href="{{ article.url }}">
|
41
|
+
<span class="square-holder" style="background-image: url({{ image_src }})">
|
42
|
+
</span>
|
43
|
+
</a>
|
44
|
+
</div>
|
45
|
+
<div class="two-thirds column">
|
46
|
+
<div class="rte fadeout-overflow-bottom grid-margins">
|
47
|
+
{% else %}
|
48
|
+
<div class="full column">
|
49
|
+
<div class="rte">
|
50
|
+
{% endif %}
|
51
|
+
{% if article.excerpt.size > 0 %}
|
52
|
+
<div class="no-images">{{ article.excerpt }}</div>
|
53
|
+
{% else %}
|
54
|
+
<p>{{ article.content | strip_html | truncatewords: 120 }}</p>
|
55
|
+
{% endif %}
|
56
|
+
</div>
|
57
|
+
<p>
|
58
|
+
<a class="blog-read-more" href="{{ article.url }}">Read more →</a>
|
59
|
+
</p>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
<div class="meta">
|
63
|
+
{% if blog.comments_enabled? and article.comments_count > 0 %}
|
64
|
+
<span class="meta-comments">
|
65
|
+
<a href="{{ article.url }}#comments"><i class="fa fa-comment"></i> {{ article.comments_count }} {{ article.comments_count | pluralize: 'comment','comments' }}</a>
|
66
|
+
</span>
|
67
|
+
{% endif %}
|
68
|
+
{% if article.tags.size > 0 %}
|
69
|
+
<span class="tags">
|
70
|
+
{% for tag in article.tags %}
|
71
|
+
<a href="{{ blog.url }}/tagged/{{ tag | handle }}">{% if forloop.first %}<i class="fa fa-tag"></i> {% endif %}{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
|
72
|
+
{% endfor %}
|
73
|
+
</span>
|
74
|
+
{% endif %}
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
{% endfor %}
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
{% if paginate.pages > 1 %}
|
83
|
+
<div class="pagination">
|
84
|
+
{% comment %}
|
85
|
+
When paginating blog articles, a previous article is actually a newer article, not an older one,
|
86
|
+
because blog articles are shown and paginated in a reversed chronological order.
|
87
|
+
The word 'previous' can be confusing, hence we'll change it.
|
88
|
+
{% endcomment %}
|
89
|
+
{{ paginate | default_pagination | replace: 'Previous', 'Newer articles' | replace: 'Next', 'Older articles' }}
|
90
|
+
{% endif %}
|
91
|
+
|
92
|
+
{% endpaginate %}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
<h1>Shopping Cart</h1>
|
2
|
+
|
3
|
+
{% if cart.item_count > 0 %}
|
4
|
+
|
5
|
+
<form action="/cart" method="post">
|
6
|
+
|
7
|
+
<table>
|
8
|
+
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<th class="hide-on-small">Item</th>
|
12
|
+
<th> </th>
|
13
|
+
<th class="hide-on-small">Price</th>
|
14
|
+
<th>Quantity</th>
|
15
|
+
<th>Total</th>
|
16
|
+
<th class="hide-on-small"> </th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
|
20
|
+
<tbody>
|
21
|
+
|
22
|
+
{% for item in cart.items %}
|
23
|
+
|
24
|
+
{% comment %}
|
25
|
+
Determining the handle of the collection that was last seen for the 'continue shopping' link.
|
26
|
+
{% endcomment %}
|
27
|
+
|
28
|
+
{% assign collection_url = item.product.collections.last.url %}
|
29
|
+
{% if collection_url == '/collections/frontpage' or collection_url == blank %}
|
30
|
+
{% assign collection_url = '/collections/all' %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
{% if forloop.first %}
|
34
|
+
{% assign continue_shopping_url = collection_url %}
|
35
|
+
{% endif %}
|
36
|
+
|
37
|
+
<tr>
|
38
|
+
<td class="hide-on-small">
|
39
|
+
<a href="{{ collection_url }}{{ item.url }}">
|
40
|
+
<img src="{{ item | img_url: 'compact' }}" alt="{{ item.title | escape }}" />
|
41
|
+
</a>
|
42
|
+
</td>
|
43
|
+
<td>
|
44
|
+
<h2 class="delta">
|
45
|
+
<a href="{{ collection_url }}{{ item.url }}">
|
46
|
+
{{ item.title }}
|
47
|
+
</a>
|
48
|
+
</h2>
|
49
|
+
{% comment %}
|
50
|
+
Line Item Properties
|
51
|
+
{% endcomment %}
|
52
|
+
{% assign properties_amount = item.properties | size %}
|
53
|
+
{% if properties_amount > 0 %}
|
54
|
+
<p>
|
55
|
+
{% for p in item.properties %}
|
56
|
+
{% unless p.last == blank %}
|
57
|
+
{{ p.first }}:
|
58
|
+
{% if p.last contains '/uploads/' %}
|
59
|
+
<a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
|
60
|
+
{% else %}
|
61
|
+
{{ p.last }}
|
62
|
+
{% endif %}
|
63
|
+
<br />
|
64
|
+
{% endunless %}
|
65
|
+
{% endfor %}
|
66
|
+
</p>
|
67
|
+
{% endif %}
|
68
|
+
<h3 class="epsilon">{{ item.vendor }}</h3>
|
69
|
+
</td>
|
70
|
+
<td class="hide-on-small">{{ item.price | money }}</td>
|
71
|
+
<td>
|
72
|
+
<input type="number" name="updates[]" id="updates_{{ item.id }}" class="quantity" value="{{ item.quantity }}" />
|
73
|
+
</td>
|
74
|
+
<td>{{ item.line_price | money }}</td>
|
75
|
+
<td class="hide-on-small">
|
76
|
+
<a href="/cart/change?line={{ forloop.index }}&quantity=0">Remove</a>
|
77
|
+
</td>
|
78
|
+
</tr>
|
79
|
+
{% endfor %}
|
80
|
+
|
81
|
+
</tbody>
|
82
|
+
|
83
|
+
</table>
|
84
|
+
|
85
|
+
{% comment %}
|
86
|
+
For the checkout and update buttons to work, they need to use
|
87
|
+
a name attribute set to 'checkout' and 'update', respectively. That's case-sensitive.
|
88
|
+
{% endcomment %}
|
89
|
+
|
90
|
+
<div class="column two-thirds flow-opposite right-aligned">
|
91
|
+
<h3 class="gamma">Subtotal <em>{{ cart.total_price | money }}</em></h3>
|
92
|
+
<a class="hide-on-small" href="{{ continue_shopping_url }}">Continue shopping</a>
|
93
|
+
<span class="or hide-on-small">or</span>
|
94
|
+
<input type="submit" name="update" value="Update cart" />
|
95
|
+
<span class="or">or</span>
|
96
|
+
<input type="submit" name="checkout" value="Check out" />
|
97
|
+
{% comment %}Paypal and Google checkout buttons{% endcomment %}
|
98
|
+
{% if additional_checkout_buttons %}
|
99
|
+
<p class="additional-checkout-buttons">
|
100
|
+
{{ content_for_additional_checkout_buttons }}
|
101
|
+
</p>
|
102
|
+
{% endif %}
|
103
|
+
</div>
|
104
|
+
|
105
|
+
{% comment %}
|
106
|
+
For the special instructions to be submitted with order,
|
107
|
+
we need to use a name attribute set to 'note'.
|
108
|
+
{% endcomment %}
|
109
|
+
<div class="column third flow-opposite left-aligned">
|
110
|
+
<p>Special instructions for seller</p>
|
111
|
+
<textarea name="note">{{ cart.note }}</textarea>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</form>
|
115
|
+
|
116
|
+
{% else %}
|
117
|
+
|
118
|
+
<div>
|
119
|
+
<h2 class="gamma">It appears that your cart is currently empty!</h2>
|
120
|
+
<h3 class="delta">You can continue browsing <a href="/collections/all">here</a>.</h3>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
{% endif %}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
{% comment %}
|
2
|
+
Important notes about pagination:
|
3
|
+
- Never access collection.products before the opening paginate tag.
|
4
|
+
- Never paginate by more than 50.
|
5
|
+
{% endcomment %}
|
6
|
+
|
7
|
+
{% assign products_per_page = settings.products_per_row | times: settings.number_of_rows %}
|
8
|
+
{% assign numbers = 'zero, one, two, three, four, five, six' | split: ',' %}
|
9
|
+
{% assign products_per_row = settings.products_per_row | times: 1 %}
|
10
|
+
{% assign products_per_row = numbers[products_per_row] | strip | append: '-per-row' %}
|
11
|
+
|
12
|
+
{% paginate collection.products by products_per_page %}
|
13
|
+
|
14
|
+
{% comment %}
|
15
|
+
Re-use the .rte class wherever you output content that was added by a merchant using
|
16
|
+
the Rich Text Editor ( 'rte' stands for rich text editor ).
|
17
|
+
Style all HTML elements in that content the same way across the board.
|
18
|
+
Use the .rte class in your CSS to help maintain consistency.
|
19
|
+
Example: the h2 element should have the same size and color in:
|
20
|
+
- product descriptions
|
21
|
+
- collection descriptions
|
22
|
+
- page content
|
23
|
+
- blog post
|
24
|
+
{% endcomment %}
|
25
|
+
|
26
|
+
<h1 class="left">{{ collection.title }}</h1>
|
27
|
+
|
28
|
+
{% comment %}
|
29
|
+
Collection sorting. Needs the JavaScript that is at the bottom of this file.
|
30
|
+
{% endcomment %}
|
31
|
+
{% if collection.products_count > 1 %}
|
32
|
+
<select class="sort-by right">
|
33
|
+
<option value="manual">Featured</option>
|
34
|
+
<option value="price-ascending">Price: Low to High</option>
|
35
|
+
<option value="price-descending">Price: Hight to Low</option>
|
36
|
+
<option value="title-ascending">A-Z</option>
|
37
|
+
<option value="title-descending">Z-A</option>
|
38
|
+
<option value="created-ascending">Oldest to Newest</option>
|
39
|
+
<option value="created-descending">Newest to Oldest</option>
|
40
|
+
<option value="best-selling">Best Selling</option>
|
41
|
+
</select>
|
42
|
+
{% endif %}
|
43
|
+
|
44
|
+
{% comment %}
|
45
|
+
Listing all tags within the current collection.
|
46
|
+
Shopify uses product tags to manage subcategories inside collections.
|
47
|
+
See 'How do I create subcategories of products?' at
|
48
|
+
http://bit.ly/1j1Dti4 for details.
|
49
|
+
{% endcomment %}
|
50
|
+
|
51
|
+
{% if collection.all_tags.size > 0 %}
|
52
|
+
<ul class="subcategories clearfix clear">
|
53
|
+
<li class="{% unless current_tags %} active{% endunless %}">
|
54
|
+
{{ 'All' | link_to_remove_tag: current_tags.first }}
|
55
|
+
</li>
|
56
|
+
{% for tag in collection.all_tags %}
|
57
|
+
{% if current_tags contains tag %}
|
58
|
+
<li class="active">
|
59
|
+
{{ tag | link_to_remove_tag: tag }}
|
60
|
+
</li>
|
61
|
+
{% else %}
|
62
|
+
<li>
|
63
|
+
{{ tag | link_to_tag: tag }}
|
64
|
+
</li>
|
65
|
+
{% endif %}
|
66
|
+
{% endfor %}
|
67
|
+
</ul>
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
{% if collection.description.size > 0 %}
|
71
|
+
<div class="rte clearfix">
|
72
|
+
{{ collection.description }}
|
73
|
+
</div>
|
74
|
+
{% endif %}
|
75
|
+
|
76
|
+
<ul class="grid clearfix">
|
77
|
+
{% for product in collection.products %}
|
78
|
+
{% include 'product-grid-item' with products_per_row %}
|
79
|
+
{% else %}
|
80
|
+
<p>There are no products in this view.</p>
|
81
|
+
{% endfor %}
|
82
|
+
</ul>
|
83
|
+
|
84
|
+
{% if paginate.pages > 1 %}
|
85
|
+
<div class="pagination centered">
|
86
|
+
{{ paginate | default_pagination }}
|
87
|
+
</div>
|
88
|
+
{% endif %}
|
89
|
+
|
90
|
+
{% endpaginate %}
|
91
|
+
|
92
|
+
{% comment %}
|
93
|
+
JavaScript for collection sorting.
|
94
|
+
{% endcomment %}
|
95
|
+
<script>
|
96
|
+
jQuery('.sort-by')
|
97
|
+
.val('{{ collection.sort_by | default: collection.default_sort_by }}')
|
98
|
+
.on('change', function() {
|
99
|
+
Shopify.queryParams.sort_by = jQuery(this).val();
|
100
|
+
location.search = jQuery.param(Shopify.queryParams).replace(/\+/g, '%20');
|
101
|
+
});
|
102
|
+
</script>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<div class="page-width">
|
2
|
+
<div class="section-header text-center">
|
3
|
+
<h1>{{ 'customer.account.title' | t }}</h1>
|
4
|
+
{{ 'layout.customer.log_out' | t | customer_logout_link }}
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="grid">
|
8
|
+
<div class="grid__item medium-up--two-thirds">
|
9
|
+
<h2>{{ 'customer.orders.title' | t }}</h2>
|
10
|
+
|
11
|
+
{% paginate customer.orders by 20 %}
|
12
|
+
{% if customer.orders.size != 0 %}
|
13
|
+
|
14
|
+
<table class="responsive-table">
|
15
|
+
<thead>
|
16
|
+
<tr>
|
17
|
+
<th>{{ 'customer.orders.order_number' | t }}</th>
|
18
|
+
<th>{{ 'customer.orders.date' | t }}</th>
|
19
|
+
<th>{{ 'customer.orders.payment_status' | t }}</th>
|
20
|
+
<th>{{ 'customer.orders.fulfillment_status' | t }}</th>
|
21
|
+
<th>{{ 'customer.orders.total' | t }}</th>
|
22
|
+
</tr>
|
23
|
+
</thead>
|
24
|
+
<tbody>
|
25
|
+
{% for order in customer.orders %}
|
26
|
+
<tr>
|
27
|
+
<td data-label="{{ 'customer.orders.order_number' | t }}">
|
28
|
+
<a href="{{ order.customer_url }}" class="btn btn--secondary btn--small">{{ order.name }}</a>
|
29
|
+
</td>
|
30
|
+
<td data-label="{{ 'customer.orders.date' | t }}">{{ order.created_at | date: format: 'month_day_year' }}</td>
|
31
|
+
<td data-label="{{ 'customer.orders.payment_status' | t }}">{{ order.financial_status_label }}</td>
|
32
|
+
<td data-label="{{ 'customer.orders.fulfillment_status' | t }}">{{ order.fulfillment_status_label }}</td>
|
33
|
+
<td data-label="{{ 'customer.orders.total' | t }}">{{ order.total_price | money }}</td>
|
34
|
+
</tr>
|
35
|
+
{% endfor %}
|
36
|
+
</tbody>
|
37
|
+
</table>
|
38
|
+
|
39
|
+
{% else %}
|
40
|
+
|
41
|
+
<p>{{ 'customer.orders.none' | t }}</p>
|
42
|
+
|
43
|
+
{% endif %}
|
44
|
+
{% if paginate.pages > 1 %}
|
45
|
+
{% include 'pagination' %}
|
46
|
+
{% endif %}
|
47
|
+
{% endpaginate %}
|
48
|
+
</div>
|
49
|
+
<div class="grid__item medium-up--one-third">
|
50
|
+
<h2>{{ 'customer.account.details' | t }}</h2>
|
51
|
+
|
52
|
+
{{ customer.default_address | format_address }}
|
53
|
+
|
54
|
+
<p><a href="/account/addresses" class="btn btn--small">{{ 'customer.account.view_addresses' | t }} ({{ customer.addresses_count }})</a></p>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
data/app/views/solidus_liquid/themes/skeleton-theme/templates/customers/activate_account.liquid
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="page-width text-center">
|
2
|
+
<div class="grid">
|
3
|
+
<div class="grid__item medium-up--one-half medium-up--push-one-quarter">
|
4
|
+
<div class="section-header">
|
5
|
+
<h1>{{ 'customer.activate_account.title' | t }}</h1>
|
6
|
+
<p>{{ 'customer.activate_account.subtext' | t }}</p>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="form-vertical">
|
10
|
+
{% form 'activate_customer_password' %}
|
11
|
+
|
12
|
+
{{ form.errors | default_errors }}
|
13
|
+
|
14
|
+
<label for="CustomerPassword" class="label--hidden">{{ 'customer.activate_account.password' | t }}</label>
|
15
|
+
<input type="password" value="" name="customer[password]" id="CustomerPassword" placeholder="{{ 'customer.activate_account.password' | t }}">
|
16
|
+
|
17
|
+
<label for="CustomerPasswordConfirmation" class="label--hidden">{{ 'customer.activate_account.password_confirm' | t }}</label>
|
18
|
+
<input type="password" value="" name="customer[password_confirmation]" id="CustomerPasswordConfirmation" placeholder="{{ 'customer.activate_account.password_confirm' | t }}">
|
19
|
+
|
20
|
+
<input type="submit" class="btn" value="{{ 'customer.activate_account.submit' | t }}">
|
21
|
+
<div><input type="submit" name="decline" value="{{ 'customer.activate_account.cancel' | t }}"></div>
|
22
|
+
{% endform %}
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
@@ -0,0 +1,173 @@
|
|
1
|
+
{% paginate customer.addresses by 5 %}
|
2
|
+
|
3
|
+
<div class="page-width text-center">
|
4
|
+
<header class="section-header">
|
5
|
+
<h1>{{ 'customer.addresses.title' | t }}</h1>
|
6
|
+
<p><a href="/account">{{ 'customer.account.return' | t }}</a></p>
|
7
|
+
<p>
|
8
|
+
<button type="button" class="btn address-new-toggle">{{ 'customer.addresses.add_new' | t }}</button>
|
9
|
+
</p>
|
10
|
+
</header>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="page-width">
|
14
|
+
<div class="grid">
|
15
|
+
<div class="grid__item medium-up--two-thirds medium-up--push-one-sixth">
|
16
|
+
{% comment %}
|
17
|
+
Add address form, hidden by default
|
18
|
+
{% endcomment %}
|
19
|
+
<div id="AddressNewForm" class="form-vertical hide">
|
20
|
+
{% form 'customer_address', customer.new_address %}
|
21
|
+
<h2>{{ 'customer.addresses.add_new' | t }}</h2>
|
22
|
+
|
23
|
+
<div class="grid">
|
24
|
+
<div class="grid__item medium-up--one-half">
|
25
|
+
<label for="AddressFirstNameNew">{{ 'customer.addresses.first_name' | t }}</label>
|
26
|
+
<input type="text" id="AddressFirstNameNew" name="address[first_name]" value="{{ form.first_name }}">
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="grid__item medium-up--one-half">
|
30
|
+
<label for="AddressLastNameNew">{{ 'customer.addresses.last_name' | t }}</label>
|
31
|
+
<input type="text" id="AddressLastNameNew" name="address[last_name]" value="{{ form.last_name }}">
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div class="grid">
|
36
|
+
<div class="grid__item">
|
37
|
+
<label for="AddressCompanyNew">{{ 'customer.addresses.company' | t }}</label>
|
38
|
+
<input type="text" id="AddressCompanyNew" name="address[company]" value="{{ form.company }}">
|
39
|
+
|
40
|
+
<label for="AddressAddress1New">{{ 'customer.addresses.address1' | t }}</label>
|
41
|
+
<input type="text" id="AddressAddress1New" name="address[address1]" value="{{ form.address1 }}">
|
42
|
+
|
43
|
+
<label for="AddressAddress2New">{{ 'customer.addresses.address2' | t }}</label>
|
44
|
+
<input type="text" id="AddressAddress2New" name="address[address2]" value="{{ form.address2 }}">
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="grid">
|
49
|
+
<div class="grid__item medium-up--one-half">
|
50
|
+
<label for="AddressCityNew">{{ 'customer.addresses.city' | t }}</label>
|
51
|
+
<input type="text" id="AddressCityNew" name="address[city]" value="{{ form.city }}">
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class="grid__item medium-up--one-half">
|
55
|
+
<label for="AddressCountryNew">{{ 'customer.addresses.country' | t }}</label>
|
56
|
+
<select id="AddressCountryNew" name="address[country]" data-default="{{ form.country }}">{{ country_option_tags }}</select>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div id="AddressProvinceContainerNew" style="display:none">
|
61
|
+
<label for="AddressProvinceNew">{{ 'customer.addresses.province' | t }}</label>
|
62
|
+
<select id="AddressProvinceNew" name="address[province]" data-default="{{ form.province }}"></select>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<label for="AddressZipNew">{{ 'customer.addresses.zip' | t }}</label>
|
66
|
+
<input type="text" id="AddressZipNew" name="address[zip]" value="{{ form.zip }}" autocapitalize="characters">
|
67
|
+
|
68
|
+
<label for="AddressPhoneNew">{{ 'customer.addresses.phone' | t }}</label>
|
69
|
+
<input type="tel" id="AddressPhoneNew" name="address[phone]" value="{{ form.phone }}">
|
70
|
+
|
71
|
+
{{ form.set_as_default_checkbox }}
|
72
|
+
<label for="address_default_address_new">{{ 'customer.addresses.set_default' | t }}</label>
|
73
|
+
|
74
|
+
<div><input type="submit" class="btn" value="{{ 'customer.addresses.add' | t }}"></div>
|
75
|
+
<div><button type="button" class="text-link address-new-toggle">{{ 'customer.addresses.cancel' | t }}</button></div>
|
76
|
+
|
77
|
+
{% endform %}
|
78
|
+
<hr>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
{% comment %}
|
82
|
+
List all customer addresses with a unique edit form.
|
83
|
+
Also add pagination in case they have a large number of addresses
|
84
|
+
{% endcomment %}
|
85
|
+
{% for address in customer.addresses %}
|
86
|
+
<div class="address text-center">
|
87
|
+
{% if address == customer.default_address %}
|
88
|
+
<p><strong>{{ 'customer.addresses.default' | t }}</strong></p>
|
89
|
+
{% endif %}
|
90
|
+
|
91
|
+
{{ address | format_address }}
|
92
|
+
|
93
|
+
<p>
|
94
|
+
<button type="button" class="btn btn--small address-edit-toggle" data-form-id="{{ address.id }}">{{ 'customer.addresses.edit' | t }}</button>
|
95
|
+
<button type="button" class="btn btn--secondary btn--small address-delete" data-form-id="{{ address.id }}" data-confirm-message="{{ 'customer.addresses.delete_confirm' | t }}">{{ 'customer.addresses.delete' | t }}</button>
|
96
|
+
</p>
|
97
|
+
</div>
|
98
|
+
|
99
|
+
<div id="EditAddress_{{ address.id }}" class="form-vertical hide">
|
100
|
+
{% form 'customer_address', address %}
|
101
|
+
|
102
|
+
<h4 class="h2">{{ 'customer.addresses.edit_address' | t }}</h4>
|
103
|
+
|
104
|
+
<div class="grid">
|
105
|
+
<div class="grid__item medium-up--one-half">
|
106
|
+
<label for="AddressFirstName_{{ form.id }}">{{ 'customer.addresses.first_name' | t }}</label>
|
107
|
+
<input type="text" id="AddressFirstName_{{ form.id }}" name="address[first_name]" value="{{ form.first_name }}">
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div class="grid__item medium-up--one-half">
|
111
|
+
<label for="AddressLastName_{{ form.id }}">{{ 'customer.addresses.last_name' | t }}</label>
|
112
|
+
<input type="text" id="AddressLastName_{{ form.id }}" name="address[last_name]" value="{{ form.last_name }}">
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<label for="AddressCompany_{{ form.id }}">{{ 'customer.addresses.company' | t }}</label>
|
117
|
+
<input type="text" id="AddressCompany_{{ form.id }}" name="address[company]" value="{{ form.company }}">
|
118
|
+
|
119
|
+
<label for="AddressAddress1_{{ form.id }}">{{ 'customer.addresses.address1' | t }}</label>
|
120
|
+
<input type="text" id="AddressAddress1_{{ form.id }}" name="address[address1]" value="{{ form.address1 }}">
|
121
|
+
|
122
|
+
<label for="AddressAddress2_{{ form.id }}">{{ 'customer.addresses.address2' | t }}</label>
|
123
|
+
<input type="text" id="AddressAddress2_{{ form.id }}" name="address[address2]" value="{{ form.address2 }}">
|
124
|
+
|
125
|
+
<div class="grid">
|
126
|
+
<div class="grid__item medium-up--one-half">
|
127
|
+
<label for="AddressCity_{{ form.id }}">{{ 'customer.addresses.city' | t }}</label>
|
128
|
+
<input type="text" id="AddressCity_{{ form.id }}" name="address[city]" value="{{ form.city }}">
|
129
|
+
</div>
|
130
|
+
<div class="grid__item medium-up--one-half">
|
131
|
+
<label for="AddressCountry_{{ form.id }}">{{ 'customer.addresses.country' | t }}</label>
|
132
|
+
<select id="AddressCountry_{{ form.id }}" class="address-country-option" data-form-id="{{ form.id }}" name="address[country]" data-default="{{ form.country }}">{{ country_option_tags }}</select>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div id="AddressProvinceContainer_{{ form.id }}" style="display:none">
|
137
|
+
<label for="AddressProvince_{{ form.id }}">{{ 'customer.addresses.province' | t }}</label>
|
138
|
+
<select id="AddressProvince_{{ form.id }}" name="address[province]" data-default="{{ form.province }}"></select>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="grid">
|
142
|
+
<div class="grid__item">
|
143
|
+
<label for="AddressZip_{{ form.id }}">{{ 'customer.addresses.zip' | t }}</label>
|
144
|
+
<input type="text" id="AddressZip_{{ form.id }}" name="address[zip]" value="{{ form.zip }}" autocapitalize="characters">
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<div class="grid__item">
|
148
|
+
<label for="AddressPhone_{{ form.id }}">{{ 'customer.addresses.phone' | t }}</label>
|
149
|
+
<input type="tel" id="AddressPhone_{{ form.id }}" name="address[phone]" value="{{ form.phone }}">
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div class="text-center">
|
154
|
+
{{ form.set_as_default_checkbox }}
|
155
|
+
<label for="address_default_address_{{ form.id }}">{{ 'customer.addresses.set_default' | t }}</label>
|
156
|
+
|
157
|
+
<div><input type="submit" class="btn" value="{{ 'customer.addresses.update' | t }}"></div>
|
158
|
+
<div><button type="button" class="text-link address-edit-toggle" data-form-id="{{ form.id }}">{{ 'customer.addresses.cancel' | t }}</button></div>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
{% endform %}
|
162
|
+
<hr>
|
163
|
+
</div>
|
164
|
+
{% endfor %}
|
165
|
+
|
166
|
+
{% if paginate.pages > 1 %}
|
167
|
+
{% include 'pagination' %}
|
168
|
+
{% endif %}
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
</div>
|
173
|
+
{% endpaginate %}
|