solidus_starter_frontend 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +57 -0
- data/.erb-lint.yml +22 -0
- data/.eslintrc +5 -0
- data/.gem_release.yml +5 -0
- data/.github/pull_request_template.md +28 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +17 -0
- data/.hound.yml +16 -0
- data/.rspec +2 -0
- data/.rubocop.yml +19 -0
- data/.rubocop_todo.yml +229 -0
- data/.scss-lint.yml +4 -0
- data/Gemfile +34 -0
- data/LICENSE +26 -0
- data/README.md +69 -0
- data/Rakefile +6 -0
- data/app/assets/config/solidus_starter_frontend_manifest.js +2 -0
- data/app/assets/javascripts/spree/frontend.js +6 -0
- data/app/assets/javascripts/spree/frontend/cart.js +26 -0
- data/app/assets/javascripts/spree/frontend/checkout.js +34 -0
- data/app/assets/javascripts/spree/frontend/checkout/address.js +124 -0
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +44 -0
- data/app/assets/javascripts/spree/frontend/locale_selector.js +9 -0
- data/app/assets/javascripts/spree/frontend/product.js +21 -0
- data/app/assets/javascripts/spree/frontend/solidus_starter_frontend.js +9 -0
- data/app/assets/javascripts/spree/frontend/utils.js.erb +18 -0
- data/app/assets/stylesheets/spree/frontend.css +8 -0
- data/app/assets/stylesheets/spree/frontend/base/_base.scss +29 -0
- data/app/assets/stylesheets/spree/frontend/base/_reset.scss +179 -0
- data/app/assets/stylesheets/spree/frontend/base/_responsive.scss +21 -0
- data/app/assets/stylesheets/spree/frontend/components/account/_account_order.scss +23 -0
- data/app/assets/stylesheets/spree/frontend/components/account/_account_summary.scss +17 -0
- data/app/assets/stylesheets/spree/frontend/components/auth/_auth_container.scss +11 -0
- data/app/assets/stylesheets/spree/frontend/components/auth/_auth_form.scss +5 -0
- data/app/assets/stylesheets/spree/frontend/components/brand/_logo.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components/buttons/_button_inline.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/components/buttons/_button_primary.scss +26 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_adjustments.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_amount_row.scss +11 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_empty.scss +10 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_footer.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_header.scss +12 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_item.scss +86 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_link.scss +22 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_page.scss +15 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_cart_secondary_actions.scss +19 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_coupon_code.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/components/cart/_item_info.scss +19 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_header.scss +19 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_summary.scss +31 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_existing_cards.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_controls.scss +5 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_selector.scss +14 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_progress_steps.scss +38 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_proposed_shipment.scss +18 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_shipment_items.scss +50 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/_shipping_methods.scss +9 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/payments/_gateway_payment_method.scss +11 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_address_step.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_confirm_step.scss +13 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_delivery_step.scss +13 -0
- data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_payment_step.scss +13 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/_address_inputs.scss +13 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_checkbox_input.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_radio_input.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_select_input.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_text.scss +32 -0
- data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_textarea_input.scss +25 -0
- data/app/assets/stylesheets/spree/frontend/components/general/_flash.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_aside.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_breadcrumbs.scss +16 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_category_navigation.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_footer.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_header.scss +12 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_horizontal_input_group.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/components/layout/_top_bar.scss +44 -0
- data/app/assets/stylesheets/spree/frontend/components/navigation/_auth_link.scss +11 -0
- data/app/assets/stylesheets/spree/frontend/components/navigation/_categories.scss +29 -0
- data/app/assets/stylesheets/spree/frontend/components/navigation/_locale_selector.scss +21 -0
- data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomies.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomy.scss +28 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_address_overview.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_coupon_codes.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_line_items.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_order_details.scss +18 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_order_item.scss +85 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_order_page.scss +41 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_order_shipments.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/orders/_payment_info.scss +29 -0
- data/app/assets/stylesheets/spree/frontend/components/presentation/_hero.scss +18 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_card.scss +35 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_image.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_info.scss +14 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_page.scss +31 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_properties.scss +23 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_submit.scss +9 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_taxons.scss +27 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_thumbnails.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_product_variants.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_products.scss +13 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_products_by_taxon.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/components/products/_products_grid.scss +18 -0
- data/app/assets/stylesheets/spree/frontend/components/search/_filter.scss +32 -0
- data/app/assets/stylesheets/spree/frontend/components/search/_search_bar.scss +34 -0
- data/app/assets/stylesheets/spree/frontend/components/typography/_hero_title.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/components/typography/_subtitle.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/placeholders/main.scss +5 -0
- data/app/assets/stylesheets/spree/frontend/screen.scss +89 -0
- data/app/assets/stylesheets/spree/frontend/solidus_starter_frontend.css +7 -0
- data/app/assets/stylesheets/spree/frontend/variables/_colors.scss +20 -0
- data/app/controllers/concerns/solidus_starter_frontend/auth_views.rb +16 -0
- data/app/controllers/concerns/solidus_starter_frontend/taxonomies.rb +16 -0
- data/app/controllers/spree/checkout_controller.rb +249 -0
- data/app/controllers/spree/coupon_codes_controller.rb +35 -0
- data/app/controllers/spree/home_controller.rb +13 -0
- data/app/controllers/spree/locale_controller.rb +20 -0
- data/app/controllers/spree/orders_controller.rb +126 -0
- data/app/controllers/spree/products_controller.rb +51 -0
- data/app/controllers/spree/store_controller.rb +31 -0
- data/app/controllers/spree/taxons_controller.rb +30 -0
- data/app/helpers/spree/orders_helper.rb +18 -0
- data/app/helpers/spree/taxon_filters_helper.rb +13 -0
- data/app/views/spree/address/_form_hidden.html.erb +12 -0
- data/app/views/spree/checkout/_terms_and_conditions.en.html.erb +1 -0
- data/app/views/spree/checkout/edit.html.erb +16 -0
- data/app/views/spree/checkout/existing_payment/_gateway.html.erb +9 -0
- data/app/views/spree/checkout/payment/_check.html.erb +0 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +43 -0
- data/app/views/spree/components/auth/_change_form.html.erb +40 -0
- data/app/views/spree/components/auth/_forgot_form.html.erb +28 -0
- data/app/views/spree/components/auth/_guest_form.html.erb +31 -0
- data/app/views/spree/components/auth/_login_form.html.erb +42 -0
- data/app/views/spree/components/auth/_signup_form.html.erb +48 -0
- data/app/views/spree/components/brand/_logo.html.erb +3 -0
- data/app/views/spree/components/buttons/_button_inline.html.erb +23 -0
- data/app/views/spree/components/buttons/_button_primary.html.erb +29 -0
- data/app/views/spree/components/cart/_cart_adjustment.html.erb +15 -0
- data/app/views/spree/components/cart/_cart_adjustments.html.erb +47 -0
- data/app/views/spree/components/cart/_cart_amount_row.html.erb +12 -0
- data/app/views/spree/components/cart/_cart_empty.html.erb +9 -0
- data/app/views/spree/components/cart/_cart_footer.html.erb +15 -0
- data/app/views/spree/components/cart/_cart_header.html.erb +17 -0
- data/app/views/spree/components/cart/_cart_item.html.erb +52 -0
- data/app/views/spree/components/cart/_cart_items.html.erb +23 -0
- data/app/views/spree/components/cart/_cart_link.html.erb +9 -0
- data/app/views/spree/components/cart/_cart_secondary_actions.html.erb +17 -0
- data/app/views/spree/components/cart/_item_info.html.erb +26 -0
- data/app/views/spree/components/checkout/_checkout_header.html.erb +8 -0
- data/app/views/spree/components/checkout/_checkout_step.html.erb +21 -0
- data/app/views/spree/components/checkout/_checkout_summary.html.erb +70 -0
- data/app/views/spree/components/checkout/_existing_cards.html.erb +39 -0
- data/app/views/spree/components/checkout/_payment_method_controls.html.erb +10 -0
- data/app/views/spree/components/checkout/_payment_method_selector.html.erb +14 -0
- data/app/views/spree/components/checkout/_proposed_shipment.erb +18 -0
- data/app/views/spree/components/checkout/_shipment_items.html.erb +22 -0
- data/app/views/spree/components/checkout/_shipping_methods.html.erb +20 -0
- data/app/views/spree/components/checkout/_unshippable_items.html.erb +7 -0
- data/app/views/spree/components/checkout/steps/_address_step.html.erb +60 -0
- data/app/views/spree/components/checkout/steps/_confirm_step.html.erb +31 -0
- data/app/views/spree/components/checkout/steps/_delivery_step.html.erb +31 -0
- data/app/views/spree/components/checkout/steps/_payment_step.html.erb +25 -0
- data/app/views/spree/components/forms/_address_inputs.html.erb +152 -0
- data/app/views/spree/components/forms/inputs/_checkbox_input.html.erb +29 -0
- data/app/views/spree/components/forms/inputs/_collection_select.html.erb +42 -0
- data/app/views/spree/components/forms/inputs/_radio_input.html.erb +29 -0
- data/app/views/spree/components/forms/inputs/_select_input.html.erb +31 -0
- data/app/views/spree/components/forms/inputs/_text.html.erb +54 -0
- data/app/views/spree/components/forms/inputs/_textarea_input.html.erb +42 -0
- data/app/views/spree/components/layout/_category_navigation.html.erb +3 -0
- data/app/views/spree/components/layout/_footer.html.erb +7 -0
- data/app/views/spree/components/layout/_header.html.erb +8 -0
- data/app/views/spree/components/layout/_top_bar.html.erb +8 -0
- data/app/views/spree/components/navigation/_auth_link.html.erb +1 -0
- data/app/views/spree/components/navigation/_breadcrumbs.html.erb +47 -0
- data/app/views/spree/components/navigation/_categories.html.erb +12 -0
- data/app/views/spree/components/navigation/_locale_selector.html.erb +25 -0
- data/app/views/spree/components/navigation/_taxonomies.html.erb +17 -0
- data/app/views/spree/components/navigation/_taxons.html.erb +17 -0
- data/app/views/spree/components/navigation/_taxons_tree.html.erb +29 -0
- data/app/views/spree/components/orders/_address_overview.html.erb +40 -0
- data/app/views/spree/components/orders/_coupon_code.html.erb +22 -0
- data/app/views/spree/components/orders/_line_items.html.erb +55 -0
- data/app/views/spree/components/orders/_order_details.html.erb +35 -0
- data/app/views/spree/components/orders/_order_item.html.erb +33 -0
- data/app/views/spree/components/orders/_order_items.html.erb +5 -0
- data/app/views/spree/components/orders/_order_shipments.html.erb +25 -0
- data/app/views/spree/components/orders/_payment_info.html.erb +31 -0
- data/app/views/spree/components/presentation/_hero.html.erb +14 -0
- data/app/views/spree/components/products/_product-card.html.erb +36 -0
- data/app/views/spree/components/products/_product_availability.html.erb +19 -0
- data/app/views/spree/components/products/_product_form.html.erb +21 -0
- data/app/views/spree/components/products/_product_image.html.erb +6 -0
- data/app/views/spree/components/products/_product_info.html.erb +9 -0
- data/app/views/spree/components/products/_product_promotions.html.erb +25 -0
- data/app/views/spree/components/products/_product_properties.html.erb +19 -0
- data/app/views/spree/components/products/_product_submit.html.erb +39 -0
- data/app/views/spree/components/products/_product_taxons.html.erb +15 -0
- data/app/views/spree/components/products/_product_thumbnails.html.erb +19 -0
- data/app/views/spree/components/products/_product_variants.html.erb +36 -0
- data/app/views/spree/components/products/_products-grid.html.erb +13 -0
- data/app/views/spree/components/products/_products.html.erb +28 -0
- data/app/views/spree/components/products/_products_by_taxon.html.erb +7 -0
- data/app/views/spree/components/products/_variants_list.html.erb +12 -0
- data/app/views/spree/components/search/_filter.html.erb +42 -0
- data/app/views/spree/components/search/_filters.html.erb +20 -0
- data/app/views/spree/components/search/_form.html.erb +12 -0
- data/app/views/spree/components/search/_products_search.html.erb +36 -0
- data/app/views/spree/components/search/_search_bar.html.erb +36 -0
- data/app/views/spree/components/typography/_hero_title.html.erb +11 -0
- data/app/views/spree/components/typography/_subtitle.html.erb +11 -0
- data/app/views/spree/home/index.html.erb +7 -0
- data/app/views/spree/layouts/spree_application.html.erb +27 -0
- data/app/views/spree/orders/edit.html.erb +21 -0
- data/app/views/spree/orders/show.html.erb +29 -0
- data/app/views/spree/products/index.html.erb +22 -0
- data/app/views/spree/products/show.html.erb +18 -0
- data/app/views/spree/shared/_image.html.erb +12 -0
- data/app/views/spree/shared/_link_to_cart.html.erb +1 -0
- data/app/views/spree/shared/_login_bar_items.html.erb +1 -0
- data/app/views/spree/shared/_shipment_tracking.html.erb +11 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
- data/app/views/spree/taxons/show.html.erb +17 -0
- data/bin/console +17 -0
- data/bin/r +13 -0
- data/bin/rails +7 -0
- data/bin/rake +7 -0
- data/bin/rspec +29 -0
- data/bin/sandbox +84 -0
- data/bin/sandbox_rails +18 -0
- data/bin/setup +8 -0
- data/bin/solidus_compare +155 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/canonical_rails.rb +16 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +33 -0
- data/config/solidus_compare.yml +33 -0
- data/docs/development.md +28 -0
- data/exe/solidus_starter_frontend +9 -0
- data/lib/generators/solidus_starter_frontend/install/install_generator.rb +15 -0
- data/lib/generators/solidus_starter_frontend/solidus_starter_frontend_generator.rb +30 -0
- data/lib/generators/solidus_starter_frontend/views/override_generator.rb +50 -0
- data/lib/solidus_starter_frontend.rb +12 -0
- data/lib/solidus_starter_frontend/config.rb +7 -0
- data/lib/solidus_starter_frontend/engine.rb +34 -0
- data/lib/solidus_starter_frontend/factories.rb +4 -0
- data/lib/solidus_starter_frontend/solidus_support_extensions.rb +9 -0
- data/lib/solidus_starter_frontend/version.rb +5 -0
- data/lib/solidus_starter_frontend_configuration.rb +8 -0
- data/lib/views/auth/spree/checkout/registration.html.erb +7 -0
- data/lib/views/auth/spree/components/navigation/_auth_link.html.erb +5 -0
- data/lib/views/auth/spree/user_passwords/edit.html.erb +7 -0
- data/lib/views/auth/spree/user_passwords/new.html.erb +5 -0
- data/lib/views/auth/spree/user_registrations/new.html.erb +7 -0
- data/lib/views/auth/spree/user_sessions/guest.html.erb +5 -0
- data/lib/views/auth/spree/user_sessions/new.html.erb +7 -0
- data/lib/views/auth/spree/users/edit.html.erb +45 -0
- data/lib/views/auth/spree/users/show.html.erb +55 -0
- data/solidus_starter_frontend.gemspec +43 -0
- data/spec/controllers/controller_helpers_spec.rb +29 -0
- data/spec/controllers/locale_controller_spec.rb +57 -0
- data/spec/controllers/spree/checkout_controller_spec.rb +563 -0
- data/spec/controllers/spree/checkout_controller_with_views_spec.rb +37 -0
- data/spec/controllers/spree/current_order_tracking_spec.rb +33 -0
- data/spec/controllers/spree/home_controller_spec.rb +29 -0
- data/spec/controllers/spree/orders_controller_ability_spec.rb +90 -0
- data/spec/controllers/spree/orders_controller_spec.rb +241 -0
- data/spec/controllers/spree/orders_controller_transitions_spec.rb +33 -0
- data/spec/controllers/spree/products_controller_spec.rb +38 -0
- data/spec/controllers/spree/taxons_controller_spec.rb +14 -0
- data/spec/fixtures/thinking-cat.jpg +0 -0
- data/spec/generators/solidus/views/override_generator_spec.rb +50 -0
- data/spec/helpers/base_helper_spec.rb +13 -0
- data/spec/helpers/order_helper_spec.rb +14 -0
- data/spec/helpers/taxon_filters_helper_spec.rb +12 -0
- data/spec/spec_helper.rb +64 -0
- data/spec/support/shared_contexts/checkout_setup.rb +12 -0
- data/spec/support/shared_contexts/custom_products.rb +28 -0
- data/spec/support/shared_contexts/locales.rb +16 -0
- data/spec/system/address_spec.rb +87 -0
- data/spec/system/automatic_promotion_adjustments_spec.rb +49 -0
- data/spec/system/caching/products_spec.rb +48 -0
- data/spec/system/caching/taxons_spec.rb +35 -0
- data/spec/system/cart_spec.rb +81 -0
- data/spec/system/checkout_confirm_insufficient_stock_spec.rb +71 -0
- data/spec/system/checkout_spec.rb +699 -0
- data/spec/system/checkout_unshippable_spec.rb +37 -0
- data/spec/system/coupon_code_spec.rb +267 -0
- data/spec/system/currency_spec.rb +20 -0
- data/spec/system/first_order_promotion_spec.rb +59 -0
- data/spec/system/free_shipping_promotions_spec.rb +60 -0
- data/spec/system/locale_spec.rb +26 -0
- data/spec/system/order_spec.rb +57 -0
- data/spec/system/products_spec.rb +302 -0
- data/spec/system/promotion_code_invalidation_spec.rb +54 -0
- data/spec/system/quantity_promotions_spec.rb +130 -0
- data/spec/system/taxons_spec.rb +158 -0
- data/spec/system/template_rendering_spec.rb +20 -0
- data/spec/views/spree/checkout/_summary_spec.rb +11 -0
- metadata +542 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="order-details">
|
2
|
+
<div class="order-details__info">
|
3
|
+
<% if order.has_checkout_step?("address") %>
|
4
|
+
<%= render(
|
5
|
+
'spree/components/orders/address_overview',
|
6
|
+
address: order.bill_address,
|
7
|
+
title: t('spree.billing_address')
|
8
|
+
) %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if order.has_checkout_step?("delivery") %>
|
12
|
+
<%= render(
|
13
|
+
'spree/components/orders/address_overview',
|
14
|
+
address: order.ship_address,
|
15
|
+
title: t('spree.shipping_address')
|
16
|
+
) %>
|
17
|
+
|
18
|
+
<%= render(
|
19
|
+
'spree/components/orders/order_shipments',
|
20
|
+
order: order,
|
21
|
+
title: t('spree.shipments')
|
22
|
+
) %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% if order.has_checkout_step?("payment") %>
|
26
|
+
<%= render(
|
27
|
+
'spree/components/orders/payment_info',
|
28
|
+
order: order
|
29
|
+
) %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<%= render 'spree/components/orders/order_items', order: order %>
|
34
|
+
<%= render 'spree/components/orders/line_items', order: order %>
|
35
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<article class="order-item">
|
2
|
+
<div class="order-item__image">
|
3
|
+
<%= link_to(
|
4
|
+
render(
|
5
|
+
'spree/shared/image',
|
6
|
+
image: item.variant.gallery.images.first || item.variant.product.gallery.images.first,
|
7
|
+
size: :small
|
8
|
+
),
|
9
|
+
item.variant.product
|
10
|
+
) %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<section class="order-item__info">
|
14
|
+
<%= render(
|
15
|
+
'spree/components/cart/item_info',
|
16
|
+
line_item: item.variant.product,
|
17
|
+
stock_info: false,
|
18
|
+
variant: item.variant
|
19
|
+
) %>
|
20
|
+
</section>
|
21
|
+
|
22
|
+
<div class="order-item__price-single">
|
23
|
+
<%= item.single_money.to_html %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="order-item__quantity">
|
27
|
+
✕<%= item.quantity %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="order-item__price">
|
31
|
+
<strong><%= item.display_amount.to_html %></strong>
|
32
|
+
</div>
|
33
|
+
</article>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="order-shipments">
|
2
|
+
<h3 class="order-shipments__title">
|
3
|
+
<%= title %>
|
4
|
+
</h3>
|
5
|
+
|
6
|
+
<%= link_to(
|
7
|
+
"[#{t('spree.actions.edit')}]",
|
8
|
+
checkout_state_path(:delivery),
|
9
|
+
{ class: 'order-shipments__edit' }
|
10
|
+
) unless @order.completed? %>
|
11
|
+
|
12
|
+
<ul class="order-shipments__info">
|
13
|
+
<% order.shipments.each do |shipment| %>
|
14
|
+
<li>
|
15
|
+
<%= t(
|
16
|
+
'spree.shipment_details',
|
17
|
+
stock_location: shipment.stock_location.name,
|
18
|
+
shipping_method: shipment.selected_shipping_rate.name
|
19
|
+
) %>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
22
|
+
</ul>
|
23
|
+
|
24
|
+
<%= render 'spree/shared/shipment_tracking', order: order if order.shipped? %>
|
25
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div class="payment-info">
|
2
|
+
<h3 class="payment-info__title">
|
3
|
+
<%= t('spree.payment_information') %>
|
4
|
+
</h3>
|
5
|
+
|
6
|
+
<%= link_to(
|
7
|
+
"[#{t('spree.actions.edit')}]",
|
8
|
+
checkout_state_path(:payment),
|
9
|
+
{ class: 'payment-info__edit' }
|
10
|
+
) unless @order.completed? %>
|
11
|
+
|
12
|
+
<% order.payments.valid.each do |payment| %>
|
13
|
+
<% source = payment.source %>
|
14
|
+
|
15
|
+
<% if source.is_a?(Spree::CreditCard) %>
|
16
|
+
<ul class="payment-info__info">
|
17
|
+
<li>
|
18
|
+
<% if source.last_digits %>
|
19
|
+
<%= t('spree.ending_in') %> <%= source.last_digits %>
|
20
|
+
<% end %>
|
21
|
+
</li>
|
22
|
+
<li><%= source.name %></li>
|
23
|
+
</ul>
|
24
|
+
<% elsif source.is_a?(Spree::StoreCredit) %>
|
25
|
+
<%= content_tag(:p, payment.payment_method.name) %>:
|
26
|
+
<%= content_tag(:p, payment.display_amount) %>
|
27
|
+
<% else %>
|
28
|
+
<%= content_tag(:p, payment.payment_method.name) %>
|
29
|
+
<% end %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<section class="hero">
|
2
|
+
<div class="hero__container">
|
3
|
+
<div class="hero__message">
|
4
|
+
<%= render(
|
5
|
+
"spree/components/typography/hero_title",
|
6
|
+
content: "A free, open-source ecommerce platform that gives you complete control over your store."
|
7
|
+
) %>
|
8
|
+
<%= render(
|
9
|
+
"spree/components/typography/subtitle",
|
10
|
+
content: "Running a high-volume online business isn’t easy – but it doesn’t have to be a headache, either."
|
11
|
+
) %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</section>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%
|
2
|
+
base_class = "product-card".freeze
|
3
|
+
|
4
|
+
# Classes
|
5
|
+
class_names = [base_class]
|
6
|
+
class_names = class_names.join(" ")
|
7
|
+
|
8
|
+
url = spree.product_path(product, taxon_id: @taxon.try(:id))
|
9
|
+
cached = @taxon.present? ?
|
10
|
+
[I18n.locale, current_pricing_options, @taxon, product] :
|
11
|
+
[I18n.locale, current_pricing_options, product]
|
12
|
+
product_id = "product_#{product.id}"
|
13
|
+
%>
|
14
|
+
|
15
|
+
<% cache cached do %>
|
16
|
+
<li class=<%= class_names %> itemscope itemtype="http://schema.org/Product" id=<%= product_id %>>
|
17
|
+
<article>
|
18
|
+
<section class="product-card_image">
|
19
|
+
<%= link_to render('spree/shared/image', image: product.gallery.images.first, size: :small, itemprop: "image"), url, itemprop: 'url' %>
|
20
|
+
</section>
|
21
|
+
<header class="product-card_header">
|
22
|
+
<h2>
|
23
|
+
<%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
|
24
|
+
</h2>
|
25
|
+
</header>
|
26
|
+
<section class="product-card_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
27
|
+
<% if price = product.price_for(current_pricing_options) %>
|
28
|
+
<span class="price selling" itemprop="price" content="<%= price.to_d %>">
|
29
|
+
<%= price.to_html %>
|
30
|
+
</span>
|
31
|
+
<% end %>
|
32
|
+
<span itemprop="priceCurrency" content="<%= current_pricing_options.currency %>"></span>
|
33
|
+
</section>
|
34
|
+
</article>
|
35
|
+
</li>
|
36
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%
|
2
|
+
base_class = "product-availability".freeze
|
3
|
+
|
4
|
+
# Classes
|
5
|
+
class_names = [base_class]
|
6
|
+
class_names = class_names.join(" ")
|
7
|
+
%>
|
8
|
+
|
9
|
+
<% if product.master.can_supply? %>
|
10
|
+
<link itemprop="availability" href="http://schema.org/InStock" />
|
11
|
+
<% elsif product.variants.empty? %>
|
12
|
+
<span
|
13
|
+
class="<%= class_names %>"
|
14
|
+
itemprop="availability"
|
15
|
+
href="http://schema.org/OutOfStock"
|
16
|
+
>
|
17
|
+
<%= t('spree.out_of_stock') %>
|
18
|
+
</span>
|
19
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%
|
2
|
+
schema_properties = {
|
3
|
+
itemprop: 'offers',
|
4
|
+
itemscope: true,
|
5
|
+
itemtype: 'http://schema.org/Offer'
|
6
|
+
}
|
7
|
+
%>
|
8
|
+
|
9
|
+
<%= form_for :order, url: populate_orders_path, html: schema_properties do |f| %>
|
10
|
+
<%= render 'spree/components/products/product_variants' %>
|
11
|
+
|
12
|
+
<% if @product.price_for(current_pricing_options) and !@product.price.nil? %>
|
13
|
+
<%= render 'spree/components/products/product_submit' %>
|
14
|
+
<% else %>
|
15
|
+
<div id="product-price">
|
16
|
+
<p class="price selling" itemprop="price">
|
17
|
+
<%= t('spree.product_not_available_in_this_currency') %>
|
18
|
+
</p>
|
19
|
+
</div>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<header class="product-info">
|
2
|
+
<h1 class="product-info__title" itemprop="name">
|
3
|
+
<%= @product.name %>
|
4
|
+
</h1>
|
5
|
+
|
6
|
+
<p class="product-info__description" itemprop="description">
|
7
|
+
<%= product_description(@product) rescue t('spree.product_has_no_description') %>
|
8
|
+
</p>
|
9
|
+
</header>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% promotions = @product.possible_promotions %>
|
2
|
+
|
3
|
+
<% if promotions.any? %>
|
4
|
+
<section class="product-promotions">
|
5
|
+
<h2><%= t('spree.promotions') %></h2>
|
6
|
+
|
7
|
+
<% promotions.each do |promotion| %>
|
8
|
+
<article>
|
9
|
+
<header>
|
10
|
+
<h3><%= promotion.name %></h3>
|
11
|
+
</header>
|
12
|
+
|
13
|
+
<p><%= promotion.description %></p>
|
14
|
+
|
15
|
+
<% if promotion.products.any? %>
|
16
|
+
<ul>
|
17
|
+
<% promotion.products.each do |product| %>
|
18
|
+
<li><%= link_to product.name, product_path(product) %></li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
21
|
+
<% end %>
|
22
|
+
</article>
|
23
|
+
<% end %>
|
24
|
+
<section>
|
25
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% unless @product_properties.empty? %>
|
2
|
+
<section class="product-properties">
|
3
|
+
<h2 class="product-properties__title">
|
4
|
+
<%= t('spree.properties')%>
|
5
|
+
</h2>
|
6
|
+
|
7
|
+
<table class="product-properties__table">
|
8
|
+
<tbody>
|
9
|
+
<% @product_properties.each do |product_property| %>
|
10
|
+
<tr>
|
11
|
+
<td><%= product_property.property.presentation %></td>
|
12
|
+
<td><%= product_property.value %></td>
|
13
|
+
</tr>
|
14
|
+
<% end %>
|
15
|
+
<% reset_cycle('properties') %>
|
16
|
+
</tbody>
|
17
|
+
</table>
|
18
|
+
</section>
|
19
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<div class="product-submit" id="product-price">
|
2
|
+
<h2 class="product-submit__title">
|
3
|
+
<span
|
4
|
+
class="price selling"
|
5
|
+
itemprop="price"
|
6
|
+
content="<%= @product.price_for(current_pricing_options).to_d %>"
|
7
|
+
>
|
8
|
+
<%= display_price(@product) %>
|
9
|
+
</span>
|
10
|
+
<span
|
11
|
+
itemprop="priceCurrency"
|
12
|
+
content="<%= current_pricing_options.currency %>"
|
13
|
+
></span>
|
14
|
+
</h2>
|
15
|
+
|
16
|
+
<%= render 'spree/components/products/product_availability', product: @product %>
|
17
|
+
|
18
|
+
<div class="horizontal-input-group">
|
19
|
+
<div class="horizontal-input-group__input">
|
20
|
+
<%= render(
|
21
|
+
"spree/components/forms/inputs/text",
|
22
|
+
id: :quantity,
|
23
|
+
min: 1,
|
24
|
+
name: :quantity,
|
25
|
+
type: :number,
|
26
|
+
value: 1
|
27
|
+
) %>
|
28
|
+
</div>
|
29
|
+
<div class="horizontal-input-group__action">
|
30
|
+
<%= render(
|
31
|
+
'spree/components/buttons/button_primary',
|
32
|
+
content: t('spree.add_to_cart'),
|
33
|
+
id: 'add-to-cart-button',
|
34
|
+
name: :button,
|
35
|
+
type: :submit
|
36
|
+
) %>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% if !@product.taxons.blank? %>
|
2
|
+
<section class="product-taxons">
|
3
|
+
<h2 class="product-taxons__title">
|
4
|
+
<%= t('spree.look_for_similar_items') %>
|
5
|
+
</h2>
|
6
|
+
|
7
|
+
<ul class="product-taxons__list">
|
8
|
+
<% @product.taxons.each do |taxon| %>
|
9
|
+
<li>
|
10
|
+
<%= link_to taxon.name, seo_url(taxon) %>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</section>
|
15
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% if @product.gallery.images.size > 1 %>
|
2
|
+
<ul class="product-thumbnails">
|
3
|
+
<% @product.gallery.images.each do |image| %>
|
4
|
+
<% next if image.viewable_id != @product.master.id %>
|
5
|
+
<li>
|
6
|
+
<%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if @product.has_variants? %>
|
11
|
+
<% @product.gallery.images.each do |image| %>
|
12
|
+
<% next if image.viewable_id == @product.master.id %>
|
13
|
+
<li>
|
14
|
+
<%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
|
15
|
+
</li>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%
|
2
|
+
variants = @product.variants_and_option_values_for(current_pricing_options)
|
3
|
+
%>
|
4
|
+
|
5
|
+
<% if variants.any? %>
|
6
|
+
<section class="product-variants" id="product-variants">
|
7
|
+
<h2 class="product-variants__title">
|
8
|
+
<%= t('spree.variants') %>
|
9
|
+
</h2>
|
10
|
+
|
11
|
+
<ul class="product-variants__list">
|
12
|
+
<% variants.each_with_index do |variant, index| %>
|
13
|
+
<li>
|
14
|
+
<%= radio_button_tag(
|
15
|
+
'variant_id',
|
16
|
+
variant.id,
|
17
|
+
index == 0,
|
18
|
+
'data-price' => variant.price_for(current_pricing_options)
|
19
|
+
) %>
|
20
|
+
|
21
|
+
<%= label_tag "variant_id_#{ variant.id }" do %>
|
22
|
+
<%= variant_options variant %>
|
23
|
+
<% if variant_price variant %>
|
24
|
+
<span class="price diff"><%= variant_price variant %></span>
|
25
|
+
<% end %>
|
26
|
+
<% unless variant.can_supply? %>
|
27
|
+
<span class="out-of-stock"><%= t('spree.out_of_stock') %></span>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
30
|
+
</li>
|
31
|
+
<% end %>
|
32
|
+
</ul>
|
33
|
+
</section>
|
34
|
+
<% else %>
|
35
|
+
<%= hidden_field_tag "variant_id", @product.master.id %>
|
36
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%
|
2
|
+
base_class = "products-grid".freeze
|
3
|
+
|
4
|
+
# Classes
|
5
|
+
class_names = [base_class]
|
6
|
+
class_names = class_names.join(" ")
|
7
|
+
%>
|
8
|
+
|
9
|
+
<ul class=<%= class_names %>>
|
10
|
+
<% products.each do |product| %>
|
11
|
+
<%= render 'spree/components/products/product-card', product: product %>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%
|
2
|
+
paginated_products = @searcher.retrieve_products if params.key?(:keywords)
|
3
|
+
paginated_products ||= products
|
4
|
+
%>
|
5
|
+
|
6
|
+
<% content_for :head do %>
|
7
|
+
<% if paginated_products.respond_to?(:total_pages) %>
|
8
|
+
<%= rel_next_prev_link_tags paginated_products %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% if products.empty? %>
|
13
|
+
<h2 class="products__results-title">
|
14
|
+
<%= t('spree.no_products_found') %>
|
15
|
+
</h2>
|
16
|
+
<% elsif params.key?(:keywords) %>
|
17
|
+
<h1 class="products__results-title">
|
18
|
+
<%= t('spree.search_results', keywords: h(params[:keywords])) %>
|
19
|
+
</h1>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<% if products.any? %>
|
23
|
+
<%= render 'spree/components/products/products-grid', products: products %>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% if paginated_products.respond_to?(:total_pages) %>
|
27
|
+
<%= paginate paginated_products %>
|
28
|
+
<% end %>
|