spree_storefront 5.0.0.rc1
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 +7 -0
- data/LICENSE.md +13 -0
- data/Rakefile +15 -0
- data/app/assets/config/spree_storefront_manifest.js +6 -0
- data/app/assets/stylesheets/storefront_page_builder.css +51 -0
- data/app/controllers/concerns/spree/cart_methods.rb +40 -0
- data/app/controllers/concerns/spree/locale_urls.rb +23 -0
- data/app/controllers/concerns/spree/password_protected.rb +17 -0
- data/app/controllers/concerns/spree/theme_concern.rb +29 -0
- data/app/controllers/spree/account/addresses_controller.rb +16 -0
- data/app/controllers/spree/account/base_controller.rb +20 -0
- data/app/controllers/spree/account/newsletter_controller.rb +34 -0
- data/app/controllers/spree/account/orders_controller.rb +34 -0
- data/app/controllers/spree/account/profile_controller.rb +23 -0
- data/app/controllers/spree/account/store_credits_controller.rb +23 -0
- data/app/controllers/spree/account/wished_items_controller.rb +45 -0
- data/app/controllers/spree/addresses_controller.rb +101 -0
- data/app/controllers/spree/checkout_controller.rb +365 -0
- data/app/controllers/spree/contacts_controller.rb +46 -0
- data/app/controllers/spree/digital_links_controller.rb +48 -0
- data/app/controllers/spree/home_controller.rb +5 -0
- data/app/controllers/spree/line_items_controller.rb +96 -0
- data/app/controllers/spree/newsletter_subscribers_controller.rb +43 -0
- data/app/controllers/spree/order_status_controller.rb +32 -0
- data/app/controllers/spree/orders_controller.rb +104 -0
- data/app/controllers/spree/page_sections_controller.rb +17 -0
- data/app/controllers/spree/pages_controller.rb +13 -0
- data/app/controllers/spree/password_controller.rb +21 -0
- data/app/controllers/spree/policies_controller.rb +17 -0
- data/app/controllers/spree/posts_controller.rb +76 -0
- data/app/controllers/spree/products_controller.rb +99 -0
- data/app/controllers/spree/search_controller.rb +39 -0
- data/app/controllers/spree/seo_controller.rb +25 -0
- data/app/controllers/spree/settings_controller.rb +68 -0
- data/app/controllers/spree/store_controller.rb +247 -0
- data/app/controllers/spree/taxonomies_controller.rb +30 -0
- data/app/controllers/spree/taxons_controller.rb +46 -0
- data/app/controllers/spree/wishlists_controller.rb +19 -0
- data/app/finders/spree/storefront/variant_finder.rb +80 -0
- data/app/helpers/spree/analytics_helper.rb +28 -0
- data/app/helpers/spree/cart_helper.rb +48 -0
- data/app/helpers/spree/checkout_analytics_helper.rb +77 -0
- data/app/helpers/spree/checkout_helper.rb +58 -0
- data/app/helpers/spree/filters_helper.rb +180 -0
- data/app/helpers/spree/fonts_helper.rb +58 -0
- data/app/helpers/spree/orders_helper.rb +7 -0
- data/app/helpers/spree/page_helper.rb +67 -0
- data/app/helpers/spree/posts_helper.rb +42 -0
- data/app/helpers/spree/products_helper.rb +205 -0
- data/app/helpers/spree/storefront_helper.rb +86 -0
- data/app/helpers/spree/storefront_locale_helper.rb +42 -0
- data/app/helpers/spree/theme_helper.rb +244 -0
- data/app/helpers/spree/turbo_helper.rb +13 -0
- data/app/helpers/spree/turbo_stream_actions_helper.rb +13 -0
- data/app/helpers/spree/wishlist_helper.rb +7 -0
- data/app/javascript/spree/storefront/application.js +156 -0
- data/app/javascript/spree/storefront/controllers/accordion_controller.js +25 -0
- data/app/javascript/spree/storefront/controllers/account_nav_controller.js +10 -0
- data/app/javascript/spree/storefront/controllers/card_validation_controller.js +103 -0
- data/app/javascript/spree/storefront/controllers/carousel_controller.js +44 -0
- data/app/javascript/spree/storefront/controllers/cart_controller.js +10 -0
- data/app/javascript/spree/storefront/controllers/checkout_address_book_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/checkout_delivery_controller.js +39 -0
- data/app/javascript/spree/storefront/controllers/checkout_promotions_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/checkout_summary_controller.js +46 -0
- data/app/javascript/spree/storefront/controllers/clear_input_controller.js +23 -0
- data/app/javascript/spree/storefront/controllers/copy_input_controller.js +19 -0
- data/app/javascript/spree/storefront/controllers/dropdown_controller.js +14 -0
- data/app/javascript/spree/storefront/controllers/header_controller.js +33 -0
- data/app/javascript/spree/storefront/controllers/infinite_scroll_controller.js +31 -0
- data/app/javascript/spree/storefront/controllers/lightbox_controller.js +138 -0
- data/app/javascript/spree/storefront/controllers/mobile_nav_controller.js +17 -0
- data/app/javascript/spree/storefront/controllers/modal_controller.js +15 -0
- data/app/javascript/spree/storefront/controllers/no_ui_slider_controller.js +55 -0
- data/app/javascript/spree/storefront/controllers/pdp_desktop_gallery_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/plp_variant_picker_controller.js +151 -0
- data/app/javascript/spree/storefront/controllers/product_form_controller.js +136 -0
- data/app/javascript/spree/storefront/controllers/quantity_picker_controller.js +43 -0
- data/app/javascript/spree/storefront/controllers/search_suggestions_controller.js +61 -0
- data/app/javascript/spree/storefront/controllers/searchable_list_controller.js +25 -0
- data/app/javascript/spree/storefront/controllers/slideover_controller.js +40 -0
- data/app/javascript/spree/storefront/controllers/sticky_button_controller.js +32 -0
- data/app/javascript/spree/storefront/controllers/toggle_menu_controller.js +32 -0
- data/app/javascript/spree/storefront/controllers/turbo_stream_form_controller.js +51 -0
- data/app/javascript/spree/storefront/controllers/wished_item_controller.js +69 -0
- data/app/javascript/spree/storefront/helpers/lazy_load_controllers_with_manifest.js +78 -0
- data/app/javascript/spree/storefront/helpers/show_flash_message.js +25 -0
- data/app/models/spree/color_names.rb +35 -0
- data/app/models/spree/contact.rb +24 -0
- data/app/presenters/spree/colors_preview_styles_presenter.rb +84 -0
- data/app/presenters/spree/featured_product_presenter.rb +42 -0
- data/app/presenters/spree/mega_nav_presenter.rb +55 -0
- data/app/views/devise/passwords/edit.html.erb +22 -0
- data/app/views/devise/passwords/new.html.erb +16 -0
- data/app/views/devise/registrations/_form.html.erb +21 -0
- data/app/views/devise/registrations/edit.html.erb +24 -0
- data/app/views/devise/registrations/new.html.erb +27 -0
- data/app/views/devise/sessions/new.html.erb +25 -0
- data/app/views/devise/shared/_links.html.erb +22 -0
- data/app/views/layouts/spree/checkout.html.erb +58 -0
- data/app/views/layouts/spree/password.html.erb +34 -0
- data/app/views/layouts/spree/storefront.html.erb +38 -0
- data/app/views/spree/account/wished_items/create.turbo_stream.erb +8 -0
- data/app/views/spree/account/wished_items/destroy.turbo_stream.erb +20 -0
- data/app/views/spree/addresses/destroy.turbo_stream.erb +1 -0
- data/app/views/spree/addresses/edit.html.erb +57 -0
- data/app/views/spree/addresses/new.html.erb +71 -0
- data/app/views/spree/checkout/_address.html.erb +153 -0
- data/app/views/spree/checkout/_button_processing.html.erb +7 -0
- data/app/views/spree/checkout/_coupon_code.html.erb +55 -0
- data/app/views/spree/checkout/_credit_card.html.erb +12 -0
- data/app/views/spree/checkout/_delivery.html.erb +70 -0
- data/app/views/spree/checkout/_line_item.html.erb +26 -0
- data/app/views/spree/checkout/_line_items.html.erb +7 -0
- data/app/views/spree/checkout/_missing_all_line_items.html.erb +17 -0
- data/app/views/spree/checkout/_missing_line_items.html.erb +28 -0
- data/app/views/spree/checkout/_payment.html.erb +35 -0
- data/app/views/spree/checkout/_payment_methods.html.erb +72 -0
- data/app/views/spree/checkout/_payment_sources.html.erb +24 -0
- data/app/views/spree/checkout/_quick_checkout.html.erb +1 -0
- data/app/views/spree/checkout/_sidebar.html.erb +34 -0
- data/app/views/spree/checkout/_store_credit.html.erb +21 -0
- data/app/views/spree/checkout/_summary.html.erb +116 -0
- data/app/views/spree/checkout/_user_account.html.erb +9 -0
- data/app/views/spree/checkout/apply_coupon_code.turbo_stream.erb +45 -0
- data/app/views/spree/checkout/apply_store_credit.turbo_stream.erb +19 -0
- data/app/views/spree/checkout/edit.html.erb +98 -0
- data/app/views/spree/checkout/payment/_check.html.erb +0 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +74 -0
- data/app/views/spree/checkout/payment/_store_credit.html.erb +13 -0
- data/app/views/spree/checkout/remove_coupon_code.turbo_stream.erb +34 -0
- data/app/views/spree/checkout/remove_store_credit.turbo_stream.erb +19 -0
- data/app/views/spree/checkout/update.turbo_stream.erb +25 -0
- data/app/views/spree/home/index.html.erb +1 -0
- data/app/views/spree/line_items/create.turbo_stream.erb +13 -0
- data/app/views/spree/line_items/destroy.turbo_stream.erb +11 -0
- data/app/views/spree/line_items/update.turbo_stream.erb +10 -0
- data/app/views/spree/newsletter_subscribers/create.turbo_stream.erb +7 -0
- data/app/views/spree/order_status/new.html.erb +16 -0
- data/app/views/spree/page_sections/show.html.erb +3 -0
- data/app/views/spree/pages/show.html.erb +1 -0
- data/app/views/spree/password/show.html.erb +1 -0
- data/app/views/spree/posts/index.html.erb +1 -0
- data/app/views/spree/posts/related_products.html.erb +7 -0
- data/app/views/spree/posts/show.html.erb +1 -0
- data/app/views/spree/products/index.html.erb +1 -0
- data/app/views/spree/products/index.turbo_stream.erb +1 -0
- data/app/views/spree/products/related.html.erb +3 -0
- data/app/views/spree/products/show.html.erb +1 -0
- data/app/views/spree/search/show.html.erb +6 -0
- data/app/views/spree/search/show.turbo_stream.erb +1 -0
- data/app/views/spree/search/suggestions.turbo_stream.erb +8 -0
- data/app/views/spree/seo/robots.text.erb +31 -0
- data/app/views/spree/seo/sitemap.xml.erb +25 -0
- data/app/views/spree/shared/_fonts.html.erb +14 -0
- data/app/views/spree/shared/_head.html.erb +36 -0
- data/app/views/spree/shared/_load_more_products.turbo_stream.erb +7 -0
- data/app/views/spree/shared/_product_listing_page.html.erb +11 -0
- data/app/views/spree/shared/_products.html.erb +1 -0
- data/app/views/spree/taxonomies/show.html.erb +1 -0
- data/app/views/spree/taxons/show.html.erb +1 -0
- data/app/views/spree/taxons/show.turbo_stream.erb +1 -0
- data/app/views/spree/waitlists/create.turbo_stream.erb +9 -0
- data/app/views/themes/default/kaminari/storefront/_first_page.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_gap.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_last_page.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_next_page.html.erb +13 -0
- data/app/views/themes/default/kaminari/storefront/_page.html.erb +10 -0
- data/app/views/themes/default/kaminari/storefront/_paginator.html.erb +27 -0
- data/app/views/themes/default/kaminari/storefront/_prev_page.html.erb +13 -0
- data/app/views/themes/default/spree/account/_account_nav.html.erb +46 -0
- data/app/views/themes/default/spree/account/_order.html.erb +39 -0
- data/app/views/themes/default/spree/account/_orders.html.erb +16 -0
- data/app/views/themes/default/spree/account/addresses/_address.html.erb +42 -0
- data/app/views/themes/default/spree/account/addresses/index.html.erb +28 -0
- data/app/views/themes/default/spree/account/newsletter/_newsletter_settings.html.erb +13 -0
- data/app/views/themes/default/spree/account/newsletter/edit.html.erb +16 -0
- data/app/views/themes/default/spree/account/newsletter/update.html.erb +1 -0
- data/app/views/themes/default/spree/account/orders/index.html.erb +24 -0
- data/app/views/themes/default/spree/account/orders/show.html.erb +22 -0
- data/app/views/themes/default/spree/account/profile/edit.html.erb +36 -0
- data/app/views/themes/default/spree/account/store_credits/_store_credit_event.html.erb +29 -0
- data/app/views/themes/default/spree/account/store_credits/index.html.erb +31 -0
- data/app/views/themes/default/spree/checkout/_footer.html.erb +10 -0
- data/app/views/themes/default/spree/checkout/complete.html.erb +84 -0
- data/app/views/themes/default/spree/contacts/new.html.erb +23 -0
- data/app/views/themes/default/spree/orders/_cart.html.erb +14 -0
- data/app/views/themes/default/spree/orders/_empty.html.erb +11 -0
- data/app/views/themes/default/spree/orders/_line_item.html.erb +47 -0
- data/app/views/themes/default/spree/orders/_line_item_quantity.html.erb +11 -0
- data/app/views/themes/default/spree/orders/_summary.html.erb +41 -0
- data/app/views/themes/default/spree/orders/edit.html.erb +18 -0
- data/app/views/themes/default/spree/orders/show.html.erb +6 -0
- data/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb +10 -0
- data/app/views/themes/default/spree/page_sections/_custom_code.html.erb +5 -0
- data/app/views/themes/default/spree/page_sections/_featured_product.html.erb +136 -0
- data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +116 -0
- data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +71 -0
- data/app/views/themes/default/spree/page_sections/_footer.html.erb +62 -0
- data/app/views/themes/default/spree/page_sections/_header.html.erb +166 -0
- data/app/views/themes/default/spree/page_sections/_image_banner.html.erb +57 -0
- data/app/views/themes/default/spree/page_sections/_image_with_text.html.erb +66 -0
- data/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb +64 -0
- data/app/views/themes/default/spree/page_sections/_main_password_header.html.erb +54 -0
- data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +47 -0
- data/app/views/themes/default/spree/page_sections/_page_title.html.erb +7 -0
- data/app/views/themes/default/spree/page_sections/_post_details.html.erb +19 -0
- data/app/views/themes/default/spree/page_sections/_post_grid.html.erb +11 -0
- data/app/views/themes/default/spree/page_sections/_product_details.html.erb +102 -0
- data/app/views/themes/default/spree/page_sections/_product_grid.html.erb +52 -0
- data/app/views/themes/default/spree/page_sections/_related_products.html.erb +15 -0
- data/app/views/themes/default/spree/page_sections/_rich_text.html.erb +18 -0
- data/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb +37 -0
- data/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb +103 -0
- data/app/views/themes/default/spree/page_sections/_video.html.erb +27 -0
- data/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb +49 -0
- data/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb +136 -0
- data/app/views/themes/default/spree/policies/show.html.erb +11 -0
- data/app/views/themes/default/spree/posts/_json_ld.html.erb +20 -0
- data/app/views/themes/default/spree/posts/_pagination.html.erb +1 -0
- data/app/views/themes/default/spree/posts/_post.html.erb +13 -0
- data/app/views/themes/default/spree/products/_add_to_cart_button.html.erb +58 -0
- data/app/views/themes/default/spree/products/_add_to_waitlist.html.erb +36 -0
- data/app/views/themes/default/spree/products/_add_to_wishlist.html.erb +33 -0
- data/app/views/themes/default/spree/products/_breadcrumbs.html.erb +23 -0
- data/app/views/themes/default/spree/products/_color_picker.html.erb +19 -0
- data/app/views/themes/default/spree/products/_color_swatches.html.erb +61 -0
- data/app/views/themes/default/spree/products/_details.html.erb +55 -0
- data/app/views/themes/default/spree/products/_featured_image.html.erb +37 -0
- data/app/views/themes/default/spree/products/_filters.html.erb +45 -0
- data/app/views/themes/default/spree/products/_json_ld.html.erb +38 -0
- data/app/views/themes/default/spree/products/_json_ld_list.html.erb +9 -0
- data/app/views/themes/default/spree/products/_json_ld_variant.html.erb +10 -0
- data/app/views/themes/default/spree/products/_label.html.erb +26 -0
- data/app/views/themes/default/spree/products/_media_gallery.html.erb +94 -0
- data/app/views/themes/default/spree/products/_price.html.erb +59 -0
- data/app/views/themes/default/spree/products/_product.html.erb +62 -0
- data/app/views/themes/default/spree/products/_quantity_selector.html.erb +32 -0
- data/app/views/themes/default/spree/products/_returns_policy_modal.html.erb +22 -0
- data/app/views/themes/default/spree/products/_show_more_button.html.erb +8 -0
- data/app/views/themes/default/spree/products/_sort.html.erb +45 -0
- data/app/views/themes/default/spree/products/_swiper.html.erb +85 -0
- data/app/views/themes/default/spree/products/_tags.html.erb +0 -0
- data/app/views/themes/default/spree/products/_variant_options.html.erb +71 -0
- data/app/views/themes/default/spree/products/_variant_picker.html.erb +50 -0
- data/app/views/themes/default/spree/products/filters/_availability.html.erb +32 -0
- data/app/views/themes/default/spree/products/filters/_colors.html.erb +23 -0
- data/app/views/themes/default/spree/products/filters/_generic.html.erb +75 -0
- data/app/views/themes/default/spree/products/filters/_price.html.erb +35 -0
- data/app/views/themes/default/spree/products/filters/_taxons.erb +78 -0
- data/app/views/themes/default/spree/search/_suggestions.html.erb +92 -0
- data/app/views/themes/default/spree/settings/show.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_account_pane.html.erb +28 -0
- data/app/views/themes/default/spree/shared/_address.html.erb +35 -0
- data/app/views/themes/default/spree/shared/_cart_icon.html.erb +13 -0
- data/app/views/themes/default/spree/shared/_cart_pane.html.erb +38 -0
- data/app/views/themes/default/spree/shared/_css_variables.html.erb +54 -0
- data/app/views/themes/default/spree/shared/_custom_head.html.erb +0 -0
- data/app/views/themes/default/spree/shared/_error_messages.html.erb +9 -0
- data/app/views/themes/default/spree/shared/_error_messages_without_base_attribute.html.erb +15 -0
- data/app/views/themes/default/spree/shared/_flash.html.erb +16 -0
- data/app/views/themes/default/spree/shared/_flashes.html.erb +10 -0
- data/app/views/themes/default/spree/shared/_json_ld.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_line_item_options.html.erb +18 -0
- data/app/views/themes/default/spree/shared/_logo.html.erb +42 -0
- data/app/views/themes/default/spree/shared/_meta_tags.html.erb +45 -0
- data/app/views/themes/default/spree/shared/_order_details.html.erb +106 -0
- data/app/views/themes/default/spree/shared/_order_line_item.html.erb +65 -0
- data/app/views/themes/default/spree/shared/_order_shipment.html.erb +71 -0
- data/app/views/themes/default/spree/shared/_search.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_title.html.erb +3 -0
- data/app/views/themes/default/spree/shared/_wishlist_icon.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_account.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_arrow-left.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_arrow-right.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_bell.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_cart.html.erb +10 -0
- data/app/views/themes/default/spree/shared/icons/_cart_48.html.erb +6 -0
- data/app/views/themes/default/spree/shared/icons/_check.html.erb +4 -0
- data/app/views/themes/default/spree/shared/icons/_chevron.html.erb +15 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_down.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_right.html.erb +15 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_up.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_close.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_cross.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_delete.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_delivery.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_disabled.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_edit.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_facebook.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_filter.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_heart.html.erb +12 -0
- data/app/views/themes/default/spree/shared/icons/_info.html.erb +7 -0
- data/app/views/themes/default/spree/shared/icons/_instagram.html.erb +18 -0
- data/app/views/themes/default/spree/shared/icons/_lock.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_menu.html.erb +10 -0
- data/app/views/themes/default/spree/shared/icons/_minus.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_pinch.html.erb +6 -0
- data/app/views/themes/default/spree/shared/icons/_pinterest.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_plus.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_return.html.erb +11 -0
- data/app/views/themes/default/spree/shared/icons/_search.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_spinner.html.erb +1 -0
- data/app/views/themes/default/spree/shared/icons/_spotify.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_tiktok.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_twitter.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_youtube.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_zoom.html.erb +10 -0
- data/app/views/themes/default/spree/wishlists/_no_wished_items.html.erb +10 -0
- data/app/views/themes/default/spree/wishlists/_wished_item.html.erb +38 -0
- data/app/views/themes/default/spree/wishlists/show.html.erb +17 -0
- data/config/i18n-tasks.yml +176 -0
- data/config/importmap.rb +22 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/heroicon.rb +10 -0
- data/config/locales/en.yml +76 -0
- data/config/routes.rb +88 -0
- data/lib/generators/spree/storefront/install/install_generator.rb +45 -0
- data/lib/generators/spree/storefront/install/templates/application.tailwind.css +1760 -0
- data/lib/generators/spree/storefront/install/templates/dev +16 -0
- data/lib/generators/spree/storefront/install/templates/tailwind.config.js +128 -0
- data/lib/generators/spree/storefront/theme/templates/model.rb.tt +12 -0
- data/lib/generators/spree/storefront/theme/theme_generator.rb +41 -0
- data/lib/spree/storefront/configuration.rb +11 -0
- data/lib/spree/storefront/engine.rb +51 -0
- data/lib/spree/storefront/testing_support/capybara_utils.rb +13 -0
- data/lib/spree/storefront.rb +16 -0
- data/lib/spree_storefront.rb +1 -0
- data/vendor/colornames.json +1 -0
- data/vendor/javascript/@kanety--stimulus-accordion.js +4 -0
- data/vendor/javascript/@stimulus-components--carousel.js +4 -0
- data/vendor/javascript/card-validator.js +4 -0
- data/vendor/javascript/credit-card-type.js +4 -0
- data/vendor/javascript/headroom.js.js +19 -0
- data/vendor/javascript/nouislider.js +4 -0
- data/vendor/javascript/photoswipe--dist--photoswipe-lightbox.esm.js.js +667 -0
- data/vendor/javascript/photoswipe.js +1675 -0
- data/vendor/javascript/stimulus-read-more.js +4 -0
- data/vendor/javascript/stimulus-scroll-to.js +4 -0
- data/vendor/javascript/swiper--bundle.js +4 -0
- metadata +567 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="text-center py-6">
|
2
|
+
<p class="mb-2 font-medium uppercase"><%= Spree.t('storefront.wished_items.no_wished_items.title') %></p>
|
3
|
+
<p><%= Spree.t('storefront.wished_items.no_wished_items.description') %></p>
|
4
|
+
<div class="flex justify-center mt-8">
|
5
|
+
<%= link_to Spree.t(:shop_all), spree.products_path, class: 'btn-primary flex' %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<script>
|
9
|
+
Turbo.cache.exemptPageFromPreview()
|
10
|
+
</script>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<div class='w-full flex justify-between flex-col' id="<%= dom_id(wished_item) %>">
|
2
|
+
<div class="relative">
|
3
|
+
<%= render 'spree/products/featured_image', object: wished_item.variant %>
|
4
|
+
<%= render 'spree/products/label', product: wished_item.product %>
|
5
|
+
<div class="absolute right-2 top-2 z-10">
|
6
|
+
<%= button_to spree.account_wishlist_wished_item_path(wished_item.variant_id), method: :delete, data: { turbo_confirm: 'Are you sure?' }, class: 'btn-icon', 'aria-label': Spree.t('storefront.wished_items.remove') do %>
|
7
|
+
<%= render 'spree/shared/icons/delete' %>
|
8
|
+
<span class="sr-only"><%= Spree.t('storefront.wished_items.remove') %></span>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div>
|
13
|
+
<div class='mt-4'>
|
14
|
+
<%= link_to wished_item.variant.name, spree_storefront_resource_url(wished_item.product, relative: true), class: 'uppercase font-medium', data: { 'turbo-frame': '_top' } %>
|
15
|
+
</div>
|
16
|
+
<%= render 'spree/products/price', product: wished_item.variant, use_variant: false, price_class: 'mt-1' %>
|
17
|
+
<div class='my-4'>
|
18
|
+
<% wished_item.variant.option_values.each do |option| %>
|
19
|
+
<div class='border-default border-t py-2 flex gap-1 uppercase tracking-widest text-sm !leading-4'>
|
20
|
+
<div class='min-w-[88px]'><%= option.option_type.presentation %>:</div>
|
21
|
+
<div><%= option.presentation %></div>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<% if wished_item.variant.available? && wished_item.variant.purchasable? && wished_item.variant.price_in(current_currency).amount&.positive? %>
|
26
|
+
<%= form_with url: spree.line_items_path do |f| %>
|
27
|
+
<%= f.hidden_field :variant_id, value: wished_item.variant_id %>
|
28
|
+
<%= f.hidden_field :quantity, value: 1 %>
|
29
|
+
<%= f.button class: 'btn-primary btn-icon w-full' do %>
|
30
|
+
<%= Spree.t(:add_to_cart) %>
|
31
|
+
<%= render 'spree/shared/icons/cart', color: 'white' %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% else %>
|
35
|
+
<div class="h-12 w-full font-medium bg-neutral-100 uppercase flex justify-center items-center rounded-button"><%= Spree.t('storefront.wished_items.unavailable') %></div>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
38
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="page-container grid grid-cols-1 lg:grid-cols-12 lg:gap-6 lg:mt-6">
|
2
|
+
<div class="lg:col-span-3">
|
3
|
+
<%= render 'spree/account/account_nav', current: 'wishlist' %>
|
4
|
+
</div>
|
5
|
+
<div class="lg:col-span-8 lg:col-start-5 mb-12 lg:mb-0" id="wishlist">
|
6
|
+
<h1 class="uppercase font-medium mb-4">
|
7
|
+
<%= Spree.t(:wishlist) %>
|
8
|
+
</h1>
|
9
|
+
<% if @wished_items.any? %>
|
10
|
+
<div class="grid lg:grid-cols-3 gap-x-6 gap-y-10 lg:mb-24">
|
11
|
+
<%= render collection: @wished_items, partial: 'spree/wishlists/wished_item', cached: ->(wished_item) { [*spree_base_cache_scope.call(wished_item), wished_item.variant, current_currency] } %>
|
12
|
+
</div>
|
13
|
+
<% else %>
|
14
|
+
<%= render 'no_wished_items' %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1,176 @@
|
|
1
|
+
# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
|
2
|
+
|
3
|
+
# The "main" locale.
|
4
|
+
base_locale: en
|
5
|
+
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
|
6
|
+
# locales: [es, fr]
|
7
|
+
## Reporting locale, default: en. Available: en, ru.
|
8
|
+
# internal_locale: en
|
9
|
+
|
10
|
+
# Read and write translations.
|
11
|
+
data:
|
12
|
+
## Translations are read from the file system. Supported format: YAML, JSON.
|
13
|
+
## Provide a custom adapter:
|
14
|
+
# adapter: I18n::Tasks::Data::FileSystem
|
15
|
+
|
16
|
+
# Locale files or `Dir.glob` patterns where translations are read from:
|
17
|
+
read:
|
18
|
+
## Default:
|
19
|
+
- config/locales/%{locale}.yml
|
20
|
+
## More files:
|
21
|
+
# - config/locales/**/*.%{locale}.yml
|
22
|
+
|
23
|
+
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
24
|
+
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
25
|
+
write:
|
26
|
+
## For example, write devise and simple form keys to their respective files:
|
27
|
+
# - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
|
28
|
+
## Catch-all default:
|
29
|
+
# - config/locales/%{locale}.yml
|
30
|
+
|
31
|
+
# External locale data (e.g. gems).
|
32
|
+
# This data is not considered unused and is never written to.
|
33
|
+
external:
|
34
|
+
## Example (replace %#= with %=):
|
35
|
+
# - "<%#= %x[bundle info vagrant --path].chomp %>/templates/locales/%{locale}.yml"
|
36
|
+
- "<%= %x[bundle info spree_core --path].chomp %>/config/locales/%{locale}.yml"
|
37
|
+
|
38
|
+
## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
|
39
|
+
# router: conservative_router
|
40
|
+
|
41
|
+
yaml:
|
42
|
+
write:
|
43
|
+
# do not wrap lines at 80 characters
|
44
|
+
line_width: -1
|
45
|
+
|
46
|
+
## Pretty-print JSON:
|
47
|
+
# json:
|
48
|
+
# write:
|
49
|
+
# indent: ' '
|
50
|
+
# space: ' '
|
51
|
+
# object_nl: "\n"
|
52
|
+
# array_nl: "\n"
|
53
|
+
|
54
|
+
# Find translate calls
|
55
|
+
search:
|
56
|
+
## Paths or `Find.find` patterns to search in:
|
57
|
+
# paths:
|
58
|
+
# - app/
|
59
|
+
|
60
|
+
## Root directories for relative keys resolution.
|
61
|
+
# relative_roots:
|
62
|
+
# - app/controllers
|
63
|
+
# - app/helpers
|
64
|
+
# - app/mailers
|
65
|
+
# - app/presenters
|
66
|
+
# - app/views
|
67
|
+
|
68
|
+
## Directories where method names which should not be part of a relative key resolution.
|
69
|
+
# By default, if a relative translation is used inside a method, the name of the method will be considered part of the resolved key.
|
70
|
+
# Directories listed here will not consider the name of the method part of the resolved key
|
71
|
+
#
|
72
|
+
# relative_exclude_method_name_paths:
|
73
|
+
# -
|
74
|
+
|
75
|
+
## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
|
76
|
+
## *.jpg *.jpeg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less
|
77
|
+
## *.yml *.json *.zip *.tar.gz *.swf *.flv *.mp3 *.wav *.flac *.webm *.mp4 *.ogg *.opus *.webp *.map *.xlsx
|
78
|
+
exclude:
|
79
|
+
- app/assets/images
|
80
|
+
- app/assets/fonts
|
81
|
+
- app/assets/videos
|
82
|
+
- app/assets/builds
|
83
|
+
|
84
|
+
## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
|
85
|
+
## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
|
86
|
+
# only: ["*.rb", "*.html.slim"]
|
87
|
+
|
88
|
+
## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
|
89
|
+
strict: false
|
90
|
+
|
91
|
+
## Allows adding ast_matchers for finding translations using the AST-scanners
|
92
|
+
## The available matchers are:
|
93
|
+
## - RailsModelMatcher
|
94
|
+
## Matches ActiveRecord translations like
|
95
|
+
## User.human_attribute_name(:email) and User.model_name.human
|
96
|
+
## - DefaultI18nSubjectMatcher
|
97
|
+
## Matches ActionMailer's default_i18n_subject method
|
98
|
+
##
|
99
|
+
## To implement your own, please see `I18n::Tasks::Scanners::AstMatchers::BaseMatcher`.
|
100
|
+
# ast_matchers:
|
101
|
+
# - 'I18n::Tasks::Scanners::AstMatchers::RailsModelMatcher'
|
102
|
+
# - 'I18n::Tasks::Scanners::AstMatchers::DefaultI18nSubjectMatcher'
|
103
|
+
|
104
|
+
## Multiple scanners can be used. Their results are merged.
|
105
|
+
## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
|
106
|
+
## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
|
107
|
+
|
108
|
+
## Translation Services
|
109
|
+
# translation:
|
110
|
+
# # Google Translate
|
111
|
+
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
|
112
|
+
# google_translate_api_key: "AbC-dEf5"
|
113
|
+
# # DeepL Pro Translate
|
114
|
+
# # Get an API key and subscription at https://www.deepl.com/pro to use DeepL Pro
|
115
|
+
# deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
|
116
|
+
# # deepl_host: "https://api.deepl.com"
|
117
|
+
# # deepl_version: "v2"
|
118
|
+
# # deepl_glossary_ids:
|
119
|
+
# # - f28106eb-0e06-489e-82c6-8215d6f95089
|
120
|
+
# # - 2c6415be-1852-4f54-9e1b-d800463496b4
|
121
|
+
# # add additional options to the DeepL.translate call: https://www.deepl.com/docs-api/translate-text/translate-text/
|
122
|
+
# deepl_options:
|
123
|
+
# formality: prefer_less
|
124
|
+
# # OpenAI
|
125
|
+
# openai_api_key: "sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
126
|
+
# # openai_model: "gpt-3.5-turbo" # see https://platform.openai.com/docs/models
|
127
|
+
# # may contain `%{from}` and `%{to}`, which will be replaced by source and target locale codes, respectively (using `Kernel.format`)
|
128
|
+
# # openai_system_prompt: >-
|
129
|
+
# # You are a professional translator that translates content from the %{from} locale
|
130
|
+
# # to the %{to} locale in an i18n locale array.
|
131
|
+
# #
|
132
|
+
# # The array has a structured format and contains multiple strings. Your task is to translate
|
133
|
+
# # each of these strings and create a new array with the translated strings.
|
134
|
+
# #
|
135
|
+
# # HTML markups (enclosed in < and > characters) must not be changed under any circumstance.
|
136
|
+
# # Variables (starting with %%{ and ending with }) must not be changed under any circumstance.
|
137
|
+
# #
|
138
|
+
# # Keep in mind the context of all the strings for a more accurate translation.
|
139
|
+
|
140
|
+
## Do not consider these keys missing:
|
141
|
+
ignore_missing:
|
142
|
+
- 'support.array.{last_word_connector,two_words_connector,words_connector}' # rails_i18n default support locales
|
143
|
+
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
|
144
|
+
# - '{devise,simple_form}.*'
|
145
|
+
|
146
|
+
## Consider these keys used:
|
147
|
+
ignore_unused:
|
148
|
+
- 'spree.storefront.refund_action_not_required_message.*'
|
149
|
+
- 'spree.storefront.refund_action_required_message.*'
|
150
|
+
|
151
|
+
## Exclude these keys from the `i18n-tasks eq-base' report:
|
152
|
+
# ignore_eq_base:
|
153
|
+
# all:
|
154
|
+
# - common.ok
|
155
|
+
# fr,es:
|
156
|
+
# - common.brand
|
157
|
+
|
158
|
+
## Exclude these keys from the `i18n-tasks check-consistent-interpolations` report:
|
159
|
+
# ignore_inconsistent_interpolations:
|
160
|
+
# - 'activerecord.attributes.*'
|
161
|
+
|
162
|
+
## Ignore these keys completely:
|
163
|
+
# ignore:
|
164
|
+
# - kaminari.*
|
165
|
+
|
166
|
+
## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
|
167
|
+
## e.g. in case of a relative key defined in a helper method.
|
168
|
+
## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
|
169
|
+
#
|
170
|
+
# <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
|
171
|
+
# only: %w(*.html.haml *.html.slim),
|
172
|
+
# patterns: [['= title\b', '.page_title']] %>
|
173
|
+
#
|
174
|
+
# The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
|
175
|
+
#
|
176
|
+
<% I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper', patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
|
data/config/importmap.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
pin 'application-spree-storefront', to: 'spree/storefront/application.js', preload: false
|
2
|
+
|
3
|
+
pin 'stimulus-scroll-to', preload: false # @4.1.0
|
4
|
+
pin 'stimulus-read-more', preload: false # @4.1.0
|
5
|
+
pin '@kanety/stimulus-accordion', to: '@kanety--stimulus-accordion.js', preload: false # @1.1.0
|
6
|
+
pin 'headroom.js', preload: false # @0.12.0
|
7
|
+
pin 'photoswipe/lightbox', to: 'photoswipe--dist--photoswipe-lightbox.esm.js.js', preload: false # @5.4.4
|
8
|
+
pin 'nouislider', preload: false # @15.8.1
|
9
|
+
pin 'swiper/bundle', to: 'https://ga.jspm.io/npm:swiper@11.2.2/swiper-bundle.mjs', preload: false # @11.2.2
|
10
|
+
pin '@stimulus-components/carousel', to: '@stimulus-components--carousel.js', preload: false # @6.0.0
|
11
|
+
pin 'photoswipe', preload: false # @5.4.4
|
12
|
+
pin 'card-validator', to: 'card-validator.js', preload: false # @10.0.2
|
13
|
+
pin 'credit-card-type', to: 'credit-card-type.js', preload: false # @10.0.2
|
14
|
+
|
15
|
+
pin_all_from Spree::Storefront::Engine.root.join('app/javascript/spree/storefront/controllers'),
|
16
|
+
under: 'spree/storefront/controllers',
|
17
|
+
to: 'spree/storefront/controllers',
|
18
|
+
preload: false
|
19
|
+
pin_all_from Spree::Storefront::Engine.root.join('app/javascript/spree/storefront/helpers'),
|
20
|
+
under: 'spree/storefront/helpers',
|
21
|
+
to: 'spree/storefront/helpers',
|
22
|
+
preload: ['application-spree-storefront']
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile << 'spree_storefront_manifest.js'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Heroicon.configure do |config|
|
4
|
+
config.variant = :solid # Options are :solid, :outline and :mini
|
5
|
+
|
6
|
+
##
|
7
|
+
# You can set a default class, which will get applied to every icon with
|
8
|
+
# the given variant. To do so, un-comment the line below.
|
9
|
+
config.default_class = {solid: "h-5 w-5 mr-2", outline: "h-6 w-6 mr-2", mini: "h-4 w-4 mr-1"}
|
10
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
spree:
|
4
|
+
storefront:
|
5
|
+
account:
|
6
|
+
change_password: Change password
|
7
|
+
newsletter_settings: Newsletter settings
|
8
|
+
no_addresses_description: If you place an order, you will find address details here.
|
9
|
+
no_addresses_title: You currently have no Addresses
|
10
|
+
no_orders_description: If you place an order, you will find details here.
|
11
|
+
no_orders_title: You currently have no orders
|
12
|
+
no_store_credits: You don't have any store credit.
|
13
|
+
personal_details: Personal details
|
14
|
+
please_update_your_contact_details: Please update your contact details
|
15
|
+
store_credits_history: Store credits history
|
16
|
+
cart:
|
17
|
+
items_in_cart: Items in cart
|
18
|
+
shipping_and_taxes_calculated_at_checkout: Shipping & taxes calculated at checkout
|
19
|
+
view_bag: View bag
|
20
|
+
checkout:
|
21
|
+
all_transactions_are_secure_and_encrypted: All transactions are secure and encrypted
|
22
|
+
already_have_an_account: Already have an account?
|
23
|
+
by_placing_this_order_you_agree_to: By placing this order you agree to
|
24
|
+
calculated_at_next_step: Calculated at next step
|
25
|
+
continue_to_cart: Continue to cart
|
26
|
+
continue_to_checkout: Continue to checkout
|
27
|
+
delivery_method: Delivery method
|
28
|
+
errors:
|
29
|
+
invalid_line_items:
|
30
|
+
one: This item will be removed from your cart because there are no delivery methods available for your address.
|
31
|
+
other: These %{count} items will be removed from your cart because there are no delivery methods available for your address.
|
32
|
+
gift_card_amount_applied: Gift card %{code} applied %{amount} to your order.
|
33
|
+
order_already_paid: You don't need to pay anything, just click Place now button to confirm the order.
|
34
|
+
order_success: Your order is confirmed!
|
35
|
+
order_success_message: When your order is ready, you will receive an email confirmation.
|
36
|
+
payment_processing_message: You will receive an email confirmation when your payment is processed.
|
37
|
+
shipping_not_available: Shipping not available
|
38
|
+
signup_for_an_account: Create an account for faster future purchases, order tracking, and more.
|
39
|
+
store_credits_amount_applied: You applied a %{amount} store credit to your order.
|
40
|
+
thanks_for_your_order: Thanks %{name} for your order!
|
41
|
+
you_will_need_to_pay_only: You will need to pay only %{amount} with your payment method of choosing.
|
42
|
+
contacts:
|
43
|
+
customer_support_email_not_configured: Customer support email is not configured
|
44
|
+
message_not_sent: Unfortunately we weren't able to send the email at this time. Please try again later
|
45
|
+
message_sent: Message sent!
|
46
|
+
newsletter_subscribers:
|
47
|
+
success: Thank you for subscribing to our newsletter!
|
48
|
+
newsletter_subscription:
|
49
|
+
description: Take control of your settings and tailor your experience according to your preferences. Customize your notifications to suit your needs.
|
50
|
+
join: Email me about new products, sales, and more. You can unsubscribe at any time.
|
51
|
+
status: You are currently %{status} to the newsletters.
|
52
|
+
refund_action_not_required_message:
|
53
|
+
order_canceled:
|
54
|
+
fully: This order has been canceled. No further action is required. You will receive a refund within couple business days.
|
55
|
+
partially: This order has been partially canceled. No further action is required. You will receive a refund within couple business days.
|
56
|
+
order_refunded:
|
57
|
+
fully: This order has been refunded. No further action is required. You will receive a refund within couple business days.
|
58
|
+
partially: This order has been partially refunded. No further action is required. You will receive a refund within couple business days.
|
59
|
+
refund_action_required_message:
|
60
|
+
order_canceled:
|
61
|
+
fully: This order has been canceled. The amount paid by the selected payment method will be refunded within couple business days. Please reach out to %{customer_support_email} to receive new voucher.
|
62
|
+
partially: This order has been partially canceled. The amount paid by the selected payment method will be refunded within couple business days. Please reach out to %{customer_support_email} to receive new voucher.
|
63
|
+
order_refunded:
|
64
|
+
fully: This order has been refunded. The amount paid by the selected payment method will be refunded within couple business days. Please reach out to %{customer_support_email} to receive new voucher.
|
65
|
+
partially: This order has been partially refunded. The amount paid by the selected payment method will be refunded within couple business days. Please reach out to %{customer_support_email} to receive new voucher.
|
66
|
+
variant_picker:
|
67
|
+
please_choose: Please choose %{option_type}
|
68
|
+
wished_items:
|
69
|
+
add: Add to wishlist
|
70
|
+
no_wished_items:
|
71
|
+
description: You have no saved items yet.
|
72
|
+
title: You have no saved items
|
73
|
+
remove: Remove from wishlist
|
74
|
+
remove_error: You already removed this item from your wishlist
|
75
|
+
select_variant: Select variant to add to wishlist
|
76
|
+
unavailable: Unavailable
|
data/config/routes.rb
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
Spree::Core::Engine.add_routes do
|
2
|
+
scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
|
3
|
+
# store password protection
|
4
|
+
get '/password', to: 'password#show', as: :password
|
5
|
+
post '/password', to: 'password#check', as: :check_password
|
6
|
+
|
7
|
+
# Product Catalog
|
8
|
+
resources :products, only: [:index, :show], path: '/products' do
|
9
|
+
member do
|
10
|
+
get :related
|
11
|
+
end
|
12
|
+
end
|
13
|
+
get '/t/*id', to: 'taxons#show', as: :nested_taxons
|
14
|
+
get '/tx/:id', to: 'taxonomies#show', as: :taxonomy
|
15
|
+
|
16
|
+
# Pages
|
17
|
+
resources :pages, only: [:show]
|
18
|
+
resources :policies, only: %i[show]
|
19
|
+
|
20
|
+
# Page Sections (used for lazy loading, eg. product carousels)
|
21
|
+
resources :page_sections, only: [:show]
|
22
|
+
|
23
|
+
# Search
|
24
|
+
get '/search', to: 'search#show', as: :search
|
25
|
+
get '/search/suggestions', to: 'search#suggestions', as: :search_suggestions
|
26
|
+
|
27
|
+
# Posts
|
28
|
+
resources :posts, only: [:index, :show] do
|
29
|
+
member do
|
30
|
+
get :related_products
|
31
|
+
end
|
32
|
+
end
|
33
|
+
get '/posts/tag/:tag', to: 'posts#index', as: :tagged_posts
|
34
|
+
get '/posts/category/:category_id', to: 'posts#index', as: :category_posts
|
35
|
+
|
36
|
+
# Cart
|
37
|
+
resources :orders, except: [:index, :new, :create, :destroy]
|
38
|
+
resources :line_items, only: [:create, :update, :destroy]
|
39
|
+
get '/cart', to: 'orders#edit', as: :cart
|
40
|
+
patch '/cart', to: 'orders#update', as: :update_cart
|
41
|
+
|
42
|
+
# Checkout
|
43
|
+
get '/checkout/:token/complete', to: 'checkout#complete', as: :checkout_complete
|
44
|
+
patch '/checkout/:token/apply_coupon_code', as: :checkout_apply_coupon_code, to: 'checkout#apply_coupon_code'
|
45
|
+
delete '/checkout/:token/remove_coupon_code', as: :checkout_remove_coupon_code, to: 'checkout#remove_coupon_code'
|
46
|
+
patch '/checkout/:token/apply_store_credit', as: :checkout_apply_store_credit, to: 'checkout#apply_store_credit'
|
47
|
+
delete '/checkout/:token/remove_store_credit', as: :checkout_remove_store_credit, to: 'checkout#remove_store_credit'
|
48
|
+
get '/checkout/:token/:state', to: 'checkout#edit', as: :checkout_state
|
49
|
+
patch '/checkout/:token/update/:state', to: 'checkout#update', as: :update_checkout
|
50
|
+
get '/checkout/:token', to: 'checkout#edit', as: :checkout
|
51
|
+
delete '/checkout/:token/remove_missing_items', to: 'checkout#remove_missing_items', as: :checkout_remove_missing_items
|
52
|
+
|
53
|
+
# Account
|
54
|
+
resources :addresses, except: [:index]
|
55
|
+
resource :account, to: redirect('/account/orders')
|
56
|
+
namespace :account do
|
57
|
+
resource :profile, controller: :profile, only: [:edit, :update]
|
58
|
+
resources :orders, only: [:index, :show]
|
59
|
+
resources :addresses, only: [:index]
|
60
|
+
resource :wishlist, only: [:show], controller: '/spree/wishlists' do
|
61
|
+
resources :wished_items, only: [:create, :destroy]
|
62
|
+
end
|
63
|
+
resource :newsletter, only: [:edit, :update], controller: :newsletter
|
64
|
+
resources :store_credits, only: [:index]
|
65
|
+
end
|
66
|
+
|
67
|
+
# Wishlists
|
68
|
+
resources :wishlists, only: [:show] # for sharing with ID and Token
|
69
|
+
|
70
|
+
# Order Status
|
71
|
+
resource :order_statuses, only: [:new, :create], path: 'order_status', as: :order_status, controller: 'order_status'
|
72
|
+
|
73
|
+
# Settings
|
74
|
+
resource :settings, only: [:update, :show]
|
75
|
+
|
76
|
+
# Newsletter
|
77
|
+
resources :newsletter_subscribers, only: [:create]
|
78
|
+
|
79
|
+
# Contact form
|
80
|
+
resources :contacts, only: [:new, :create]
|
81
|
+
get '/contact', to: 'contacts#new', as: 'contact'
|
82
|
+
|
83
|
+
# Digital Links
|
84
|
+
resources :digital_links, only: [:show]
|
85
|
+
|
86
|
+
root to: 'home#index'
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module Storefront
|
5
|
+
module Generators
|
6
|
+
class InstallGenerator < Rails::Generators::Base
|
7
|
+
desc 'Installs Spree Storefront'
|
8
|
+
|
9
|
+
def self.source_paths
|
10
|
+
[
|
11
|
+
File.expand_path('templates', __dir__),
|
12
|
+
File.expand_path('../templates', "../#{__FILE__}"),
|
13
|
+
File.expand_path('../templates', "../../#{__FILE__}")
|
14
|
+
]
|
15
|
+
end
|
16
|
+
|
17
|
+
def install
|
18
|
+
template 'application.tailwind.css', 'app/assets/stylesheets/application.tailwind.css'
|
19
|
+
template 'tailwind.config.js', 'config/tailwind.config.js'
|
20
|
+
|
21
|
+
if Rails.root && Rails.root.join("Procfile.dev").exist?
|
22
|
+
append_to_file 'Procfile.dev', "\nstorefront_css: bin/rails tailwindcss:watch" unless File.read('Procfile.dev').include?('storefront_css:')
|
23
|
+
else
|
24
|
+
create_file 'Procfile.dev', "storefront_css: bin/rails tailwindcss:watch\n"
|
25
|
+
end
|
26
|
+
|
27
|
+
say "Add bin/dev to start foreman"
|
28
|
+
copy_file "dev", "bin/dev", force: true
|
29
|
+
chmod "bin/dev", 0755, verbose: false
|
30
|
+
|
31
|
+
empty_directory Rails.root.join('app/assets/builds') if Rails.root
|
32
|
+
|
33
|
+
unless File.exist?('app/assets/config/manifest.js')
|
34
|
+
create_file 'app/assets/config/manifest.js', "//= link_tree ../builds\n"
|
35
|
+
|
36
|
+
say "Ensure foreman is installed"
|
37
|
+
run "gem install foreman"
|
38
|
+
else
|
39
|
+
append_to_file 'app/assets/config/manifest.js', "\n//= link_tree ../builds" unless File.read('app/assets/config/manifest.js').include?('//= link_tree ../builds')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|