spree_storefront 5.1.7 → 5.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d409c875002f45d0a97f292bbbfdd22c12f00be88fde4def9e48da9e744e7fd
4
- data.tar.gz: 4bb19a77fa953a8ee2d4a2c83d930669da8a08a6e6d1074a46cbba89b91b33cb
3
+ metadata.gz: 6128c8f6759d5c61bb829501ea818758e80ee6d6c0d4b766ae48c1e8b0449411
4
+ data.tar.gz: 5bc065803d2e89835f5890d92f488eb006f43b594b8c17ede3011729685996db
5
5
  SHA512:
6
- metadata.gz: e2e780b8af3f79748b90ae3976cf6e6d5f8754402227722155166f6c2e434971b751fa2b140ee2e51ae17da859b480bf20e20b8272c18b64362518fb7ac8de60
7
- data.tar.gz: 3de9d2da3003ba618ad92a28abf2259acd6a5c9112074b1ef4757f3128351925db2d95c7f08a12adf08d290fc3ed9edca2aadb5956d90827cad3c6a8a2242e4e
6
+ metadata.gz: 6567f8bd0dd742f910187147b4e93aa53e4f3f64692ae71889b27c214fc8e28dfa7d5e4ab198fb5faf7a0bb41097f3564647ed713354dfb640a73023c0128620
7
+ data.tar.gz: d73d41b17139af7a941e3ade312510db6d550d0e88e950565b9c4c80c01a016de6fbb0ef3c89bdbdf6639836f47b24ceabde14295e3c83fccc0a0fef9ed9815e
@@ -1,6 +1,7 @@
1
1
  module Spree
2
2
  class AddressesController < Spree::StoreController
3
3
  helper Spree::AddressesHelper
4
+ before_action :require_user
4
5
  before_action :load_and_authorize_address, except: [:index]
5
6
 
6
7
  def create
@@ -15,7 +15,7 @@ module Spree
15
15
  @quantity = params[:quantity].to_i || 1
16
16
  options = params[:options] || {}
17
17
 
18
- cookies.permanent.signed[:token] = @order.token if @order.persisted?
18
+ cookies.permanent.signed[:token] = { value: @order.token, domain: current_store.url_or_custom_domain } if @order.persisted?
19
19
 
20
20
  result = cart_add_item_service.call(order: @order,
21
21
  variant: @variant,
@@ -193,7 +193,11 @@ module Spree
193
193
  def redirect_unauthorized_access
194
194
  if try_spree_current_user
195
195
  flash[:error] = Spree.t(:authorization_failure)
196
- redirect_to spree.forbidden_path
196
+ if spree.respond_to?(:forbidden_path)
197
+ redirect_to spree.forbidden_path
198
+ else
199
+ redirect_to spree.root_path
200
+ end
197
201
  else
198
202
  store_location
199
203
  if respond_to?(:spree_login_path)
@@ -16,9 +16,11 @@
16
16
 
17
17
  <script async src="https://ga.jspm.io/npm:es-module-shims@1.8.2/dist/es-module-shims.js" data-turbo-track="reload"></script>
18
18
 
19
- <%= javascript_importmap_tags "application-spree-storefront" %>
20
19
  <% if Rails.application.importmap.packages["application"].present? %>
21
- <%= javascript_import_module_tag "application" %>
20
+ <%= javascript_importmap_tags "application" %>
21
+ <%= javascript_import_module_tag "application-spree-storefront" %>
22
+ <% else %>
23
+ <%= javascript_importmap_tags "application-spree-storefront" %>
22
24
  <% end %>
23
25
 
24
26
  <%= javascript_tag "wishedVariantIds = #{(current_wishlist&.variant_ids&.map(&:to_s) || []).to_json.html_safe};" %>
@@ -37,24 +37,28 @@
37
37
 
38
38
  <div class="mt-6 bg-accent mb-24">
39
39
  <div class="grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6 p-4 lg:p-6 text-sm bg-border bg-accent-100">
40
- <!-- billing address -->
41
- <div>
42
- <div class="uppercase tracking-widest mb-2">
43
- <%= Spree.t(:billing_address) %>
44
- </div>
45
- <div class="!leading-[1.375rem] text-neutral-800">
46
- <%= render 'spree/shared/address', address: order.billing_address %>
47
- </div>
48
- </div>
49
- <!-- payment into -->
50
- <div class="mb-5 lg:mb-0">
51
- <div class="uppercase tracking-widest mb-2">
52
- <%= Spree.t(:payment_information) %>
40
+ <% if order.billing_address.present? %>
41
+ <!-- billing address -->
42
+ <div>
43
+ <div class="uppercase tracking-widest mb-2">
44
+ <%= Spree.t(:billing_address) %>
45
+ </div>
46
+ <div class="!leading-[1.375rem] text-neutral-800">
47
+ <%= render 'spree/shared/address', address: order.billing_address %>
48
+ </div>
53
49
  </div>
54
- <div class="!leading-[1.375rem] text-neutral-800">
55
- <%= render collection: order.payments.valid, partial: 'spree/shared/payment', cached: spree_base_cache_scope %>
50
+ <% end %>
51
+ <% if order.payments.valid.any? %>
52
+ <!-- payment into -->
53
+ <div class="mb-5 lg:mb-0">
54
+ <div class="uppercase tracking-widest mb-2">
55
+ <%= Spree.t(:payment_information) %>
56
+ </div>
57
+ <div class="!leading-[1.375rem] text-neutral-800">
58
+ <%= render collection: order.payments.valid, partial: 'spree/shared/payment', cached: spree_base_cache_scope %>
59
+ </div>
56
60
  </div>
57
- </div>
61
+ <% end %>
58
62
  </div>
59
63
  <!-- totals/summary -->
60
64
  <div class="p-4 lg:p-6 text-sm">
@@ -1,14 +1,15 @@
1
1
  <li class="border border-accent mb-4">
2
2
  <div class="p-4 lg:p-6">
3
3
  <div class="flex flex-col lg:flex-row lg:gap-6 gap-4">
4
- <% if shipment.order.requires_ship_address? %>
4
+ <% ship_address = shipment.address || shipment.order.ship_address %>
5
+ <% if shipment.order.requires_ship_address? && ship_address.present? %>
5
6
  <div class="text-sm lg:w-1/2">
6
7
  <div class="tracking-widest uppercase mb-2">
7
8
  <%= Spree.t(:delivery_address) %>
8
9
  </div>
9
10
  <div class="!leading-[1.375rem] text-neutral-800">
10
11
  <%= render "spree/shared/address",
11
- address: shipment.address || shipment.order.ship_address %>
12
+ address: ship_address %>
12
13
  </div>
13
14
  </div>
14
15
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_storefront
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.7
4
+ version: 5.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vendo Connect Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-29 00:00:00.000000000 Z
11
+ date: 2026-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.7
19
+ version: 5.1.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.7
26
+ version: 5.1.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: active_link_to
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -562,9 +562,9 @@ licenses:
562
562
  - AGPL-3.0-or-later
563
563
  metadata:
564
564
  bug_tracker_uri: https://github.com/spree/spree/issues
565
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.7
565
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.9
566
566
  documentation_uri: https://docs.spreecommerce.org/
567
- source_code_uri: https://github.com/spree/spree/tree/v5.1.7
567
+ source_code_uri: https://github.com/spree/spree/tree/v5.1.9
568
568
  post_install_message:
569
569
  rdoc_options: []
570
570
  require_paths: