spree_core 4.2.0.rc2 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree.js +20 -0
- data/app/controllers/spree/base_controller.rb +2 -3
- data/app/controllers/spree/errors_controller.rb +11 -0
- data/app/finders/spree/addresses/find.rb +1 -12
- data/app/finders/spree/base_finder.rb +14 -0
- data/app/finders/spree/countries/find.rb +11 -3
- data/app/finders/spree/credit_cards/find.rb +2 -2
- data/app/finders/spree/orders/find_current.rb +2 -2
- data/app/finders/spree/products/find.rb +14 -3
- data/app/helpers/spree/base_helper.rb +3 -8
- data/app/helpers/spree/currency_helper.rb +34 -0
- data/app/helpers/spree/locale_helper.rb +31 -0
- data/app/helpers/spree/products_helper.rb +37 -12
- data/app/mailers/spree/base_mailer.rb +4 -4
- data/app/mailers/spree/order_mailer.rb +3 -3
- data/app/mailers/spree/reimbursement_mailer.rb +1 -1
- data/app/mailers/spree/shipment_mailer.rb +1 -1
- data/app/models/concerns/spree/default_price.rb +1 -5
- data/app/models/concerns/spree/product_scopes.rb +1 -1
- data/app/models/concerns/spree/user_methods.rb +2 -2
- data/app/models/concerns/spree/user_payment_source.rb +1 -1
- data/app/models/spree/ability.rb +45 -34
- data/app/models/spree/address.rb +4 -0
- data/app/models/spree/app_configuration.rb +2 -2
- data/app/models/spree/app_dependencies.rb +6 -2
- data/app/models/spree/base.rb +5 -0
- data/app/models/spree/credit_card.rb +4 -0
- data/app/models/spree/fulfilment_changer.rb +58 -16
- data/app/models/spree/image.rb +14 -14
- data/app/models/spree/inventory_unit.rb +2 -7
- data/app/models/spree/line_item.rb +7 -15
- data/app/models/spree/order.rb +1 -0
- data/app/models/spree/payment.rb +18 -4
- data/app/models/spree/payment/processing.rb +2 -2
- data/app/models/spree/payment_method.rb +3 -3
- data/app/models/spree/price.rb +2 -7
- data/app/models/spree/product.rb +41 -17
- data/app/models/spree/promotion/rules/option_value.rb +1 -1
- data/app/models/spree/promotion/rules/product.rb +2 -1
- data/app/models/spree/promotion/rules/user.rb +2 -1
- data/app/models/spree/refund.rb +2 -2
- data/app/models/spree/return_item/eligibility_validator/default.rb +0 -2
- data/app/models/spree/return_item/eligibility_validator/{r_m_a_required.rb → rma_required.rb} +0 -0
- data/app/models/spree/shipment.rb +1 -1
- data/app/models/spree/shipping_method.rb +1 -5
- data/app/models/spree/shipping_rate.rb +2 -11
- data/app/models/spree/stock/availability_validator.rb +3 -4
- data/app/models/spree/stock_item.rb +1 -5
- data/app/models/spree/store.rb +55 -2
- data/app/models/spree/store_credit.rb +1 -1
- data/app/models/spree/variant.rb +9 -16
- data/app/models/spree/zone.rb +13 -4
- data/app/paginators/spree/shared/paginate.rb +8 -1
- data/app/presenters/spree/variant_presenter.rb +2 -5
- data/app/services/spree/account/addresses/create.rb +6 -1
- data/app/services/spree/account/addresses/{base.rb → helper.rb} +1 -3
- data/app/services/spree/account/addresses/update.rb +6 -1
- data/app/services/spree/build_localized_redirect_url.rb +101 -0
- data/app/services/spree/cart/estimate_shipping_rates.rb +1 -1
- data/app/services/spree/compare_line_items.rb +4 -2
- data/app/sorters/spree/base_sorter.rb +35 -0
- data/app/sorters/spree/orders/sort.rb +1 -37
- data/app/sorters/spree/products/sort.rb +9 -32
- data/app/validators/email_validator.rb +1 -1
- data/app/views/spree/errors/forbidden.html.erb +0 -0
- data/app/views/spree/errors/unauthorized.html.erb +0 -0
- data/app/views/spree/shared/_base_mailer_stylesheets.html.erb +13 -2
- data/app/views/spree/shared/_purchased_items_table.html.erb +15 -6
- data/app/views/spree/shared/purchased_items_table/_adjustment.html.erb +2 -2
- data/app/views/spree/shared/purchased_items_table/_line_item.html.erb +2 -2
- data/config/initializers/inflections.rb +3 -0
- data/config/initializers/rails61_fixes.rb +3 -0
- data/config/locales/en.yml +31 -60
- data/config/routes.rb +2 -1
- data/db/default/spree/stores.rb +1 -0
- data/db/default/spree/zones.rb +4 -1
- data/db/migrate/20130326175857_add_stock_location_to_rma.rb +1 -1
- data/db/migrate/20191017121054_add_supported_currencies_to_store.rb +1 -0
- data/db/migrate/20201012091259_add_filterable_column_to_spree_option_types.rb +6 -2
- data/db/migrate/20201127084048_add_default_country_kind_to_spree_zones.rb +5 -0
- data/db/migrate/20210112193440_remove_contact_email_from_spree_stores.rb +5 -0
- data/db/migrate/20210114182625_create_spree_payment_methods_stores.rb +10 -0
- data/db/migrate/20210114220232_migrate_data_payment_methods_stores.rb +15 -0
- data/db/migrate/20210117112551_remove_store_id_from_spree_payment_methods.rb +5 -0
- data/db/migrate/20210120142527_ensure_default_locale_in_spree_stores.rb +5 -0
- data/db/migrate/20210205211040_add_supported_locales_to_spree_stores.rb +11 -0
- data/db/migrate/20210215202602_migrate_spree_i18n_globalize_config.rb +22 -0
- data/lib/generators/spree/install/install_generator.rb +9 -6
- data/lib/spree/core.rb +2 -1
- data/lib/spree/core/controller_helpers/auth.rb +3 -1
- data/lib/spree/core/controller_helpers/common.rb +6 -8
- data/lib/spree/core/controller_helpers/currency.rb +54 -0
- data/lib/spree/core/controller_helpers/locale.rb +58 -0
- data/lib/spree/core/controller_helpers/search.rb +1 -1
- data/lib/spree/core/controller_helpers/store.rb +4 -16
- data/lib/spree/core/product_filters.rb +3 -3
- data/lib/spree/core/version.rb +3 -1
- data/lib/spree/i18n.rb +17 -19
- data/lib/spree/permitted_attributes.rb +2 -2
- data/lib/spree/service_module.rb +8 -4
- data/lib/spree/testing_support/capybara_config.rb +1 -1
- data/lib/spree/testing_support/common_rake.rb +1 -1
- data/lib/spree/testing_support/controller_requests.rb +10 -10
- data/lib/spree/testing_support/factories/shipment_factory.rb +7 -9
- data/lib/spree/testing_support/factories/stock_location_factory.rb +2 -2
- data/lib/spree/testing_support/factories/store_factory.rb +1 -0
- data/lib/spree/testing_support/factories/zone_factory.rb +16 -13
- data/lib/spree/testing_support/flatpickr_capybara.rb +101 -0
- data/lib/spree/testing_support/locale_helpers.rb +78 -0
- data/lib/spree/testing_support/next_instance_of.rb +38 -0
- data/lib/spree/testing_support/order_walkthrough.rb +8 -3
- data/lib/spree/testing_support/rspec_retry_config.rb +10 -0
- data/spree_core.gemspec +5 -4
- metadata +71 -26
- data/lib/generators/spree/install/templates/config/initializers/spree_storefront.rb +0 -1
- data/lib/generators/spree/install/templates/config/spree_storefront.yml +0 -67
- data/lib/spree/core/controller_helpers/currency_helpers.rb +0 -15
- data/lib/spree/i18n/base.rb +0 -17
- data/lib/spree/i18n/initializer.rb +0 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
class EmailValidator < ActiveModel::EachValidator
|
2
2
|
def validate_each(record, attribute, value)
|
3
3
|
unless value =~ /\A[^@\s]+@[^@\s]+\z/
|
4
|
-
record.errors.add(attribute, :invalid, { value: value }.merge!(options))
|
4
|
+
record.errors.add(attribute, :invalid, **{ value: value }.merge!(options))
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
File without changes
|
File without changes
|
@@ -249,11 +249,9 @@
|
|
249
249
|
color: #51545E;
|
250
250
|
font-size: 15px;
|
251
251
|
line-height: 18px;
|
252
|
-
width: 62%;
|
253
252
|
}
|
254
253
|
|
255
254
|
.purchase_image {
|
256
|
-
width: 18%;
|
257
255
|
padding: 5px;
|
258
256
|
}
|
259
257
|
|
@@ -289,10 +287,20 @@
|
|
289
287
|
color: #333333;
|
290
288
|
}
|
291
289
|
|
290
|
+
.purchase_total--name {
|
291
|
+
margin: 0;
|
292
|
+
text-align: right;
|
293
|
+
color: #333333;
|
294
|
+
}
|
295
|
+
|
292
296
|
.purchase_total--label {
|
293
297
|
padding: 0 15px 0 0;
|
294
298
|
}
|
295
299
|
|
300
|
+
.purchase_total-col {
|
301
|
+
vertical-align: bottom;
|
302
|
+
}
|
303
|
+
|
296
304
|
body {
|
297
305
|
background-color: #F2F4F6;
|
298
306
|
color: #51545E;
|
@@ -402,6 +410,9 @@
|
|
402
410
|
.email-footer {
|
403
411
|
width: 100% !important;
|
404
412
|
}
|
413
|
+
.content-cell {
|
414
|
+
padding: 40px 15px !important;
|
415
|
+
}
|
405
416
|
}
|
406
417
|
|
407
418
|
@media (prefers-color-scheme: dark) {
|
@@ -8,10 +8,13 @@
|
|
8
8
|
<td></td>
|
9
9
|
<td>
|
10
10
|
<p class="f-fallback purchase_total purchase_total--label">
|
11
|
-
<%= Spree.t(:promotion)
|
11
|
+
<%= Spree.t(:promotion) %>:
|
12
|
+
</p>
|
13
|
+
<p class="f-fallback purchase_total--name purchase_total--label">
|
14
|
+
<%= label %>
|
12
15
|
</p>
|
13
16
|
</td>
|
14
|
-
<td>
|
17
|
+
<td class="purchase_total-col">
|
15
18
|
<p class="f-fallback purchase_total">
|
16
19
|
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
|
17
20
|
</p>
|
@@ -25,10 +28,13 @@
|
|
25
28
|
<td></td>
|
26
29
|
<td>
|
27
30
|
<p class="f-fallback purchase_total purchase_total--label">
|
28
|
-
<%= Spree.t(:shipping)
|
31
|
+
<%= Spree.t(:shipping) %>:
|
32
|
+
</p>
|
33
|
+
<p class="f-fallback purchase_total--name purchase_total--label">
|
34
|
+
<%= name %>
|
29
35
|
</p>
|
30
36
|
</td>
|
31
|
-
<td>
|
37
|
+
<td class="purchase_total-col">
|
32
38
|
<p class="f-fallback purchase_total">
|
33
39
|
<%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency) %>
|
34
40
|
</p>
|
@@ -41,10 +47,13 @@
|
|
41
47
|
<td></td>
|
42
48
|
<td>
|
43
49
|
<p class="f-fallback purchase_total purchase_total--label">
|
44
|
-
<%= Spree.t(:tax)
|
50
|
+
<%= Spree.t(:tax) %>:
|
51
|
+
</p>
|
52
|
+
<p class="f-fallback purchase_total--name purchase_total--label">
|
53
|
+
<%= label %>
|
45
54
|
</p>
|
46
55
|
</td>
|
47
|
-
<td>
|
56
|
+
<td class="purchase_total-col">
|
48
57
|
<p class="f-fallback purchase_total">
|
49
58
|
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
|
50
59
|
</p>
|
@@ -18,9 +18,9 @@
|
|
18
18
|
</strong>
|
19
19
|
<p class="purchase_item--additional"><%= raw(line_item.variant.options_text) -%></p>
|
20
20
|
</td>
|
21
|
-
<td class="align-right">
|
21
|
+
<td class="align-right" width="30%">
|
22
22
|
<span class="f-fallback purchase_item_price">
|
23
|
-
<%= line_item.quantity %> x <%= line_item.single_money
|
23
|
+
<%= line_item.quantity %> x <%= line_item.single_money %><br>
|
24
24
|
<%= line_item.display_amount %>
|
25
25
|
</span>
|
26
26
|
</td>
|
data/config/locales/en.yml
CHANGED
@@ -6,7 +6,7 @@ en:
|
|
6
6
|
attributes:
|
7
7
|
desired_shipment:
|
8
8
|
can_not_transfer_within_same_shipment: can not be same as current shipment
|
9
|
-
|
9
|
+
has_not_enough_stock_at_desired_location: has not enough stock in desired stock location
|
10
10
|
current_shipment:
|
11
11
|
has_already_been_shipped: has already been shipped
|
12
12
|
can_not_have_backordered_inventory_units: has backordered inventory units
|
@@ -142,7 +142,8 @@ en:
|
|
142
142
|
url: Site URL
|
143
143
|
meta_description: Meta Description
|
144
144
|
meta_keywords: Meta Keywords
|
145
|
-
|
145
|
+
seo_robots: SEO Robots
|
146
|
+
seo_title: SEO Title
|
146
147
|
name: Site Name
|
147
148
|
mail_from_address: Mail From Address
|
148
149
|
spree/store_credit:
|
@@ -662,7 +663,6 @@ en:
|
|
662
663
|
jackets_and_coats: JACKET & COASTS
|
663
664
|
new_collection: NEW COLLECTION
|
664
665
|
special_offers: SPECIAL OFFERS
|
665
|
-
summer_2019: SUMMER 2019
|
666
666
|
channel: Channel
|
667
667
|
charged: Charged
|
668
668
|
checkout: Checkout
|
@@ -695,7 +695,6 @@ en:
|
|
695
695
|
confirm: Confirm
|
696
696
|
confirm_delete: Confirm Deletion
|
697
697
|
confirm_password: Password Confirmation
|
698
|
-
contact_email: Contact email
|
699
698
|
contact_phone: Contact phone
|
700
699
|
contact_us: Contact us
|
701
700
|
continue: Continue
|
@@ -756,42 +755,14 @@ en:
|
|
756
755
|
new_order_notifications_email: New Order Notifications Email
|
757
756
|
cut: Cut
|
758
757
|
cvv: CVV
|
758
|
+
no_cc_type: N/A
|
759
759
|
cvv_response: CVV Response
|
760
760
|
date: Date
|
761
761
|
date_completed: Date Completed
|
762
762
|
date_picker:
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
hourAriaLabel: 'Hour'
|
767
|
-
js_format: Y/m/d
|
768
|
-
js_date_time: Y/m/d - H:i
|
769
|
-
minuteAriaLabel: 'Minute'
|
770
|
-
pm: 'PM'
|
771
|
-
rangeSeparator: ' to '
|
772
|
-
scrollTitle: 'Scroll to increment'
|
773
|
-
toggleTitle: 'Click to toggle'
|
774
|
-
weekAbbreviation: 'Wk'
|
775
|
-
yearAriaLabel: 'Year'
|
776
|
-
sun: 'Sun'
|
777
|
-
mon: 'Mon'
|
778
|
-
tue: 'Tue'
|
779
|
-
wed: 'Wed'
|
780
|
-
thu: 'Thu'
|
781
|
-
fri: 'Fri'
|
782
|
-
sat: 'Sat'
|
783
|
-
lh_jan: 'January'
|
784
|
-
lh_feb: 'February'
|
785
|
-
lh_mar: 'March'
|
786
|
-
lh_apr: 'April'
|
787
|
-
lh_may: 'May'
|
788
|
-
lh_jun: 'June'
|
789
|
-
lh_jul: 'July'
|
790
|
-
lh_aug: 'August'
|
791
|
-
lh_sep: 'September'
|
792
|
-
lh_oct: 'October'
|
793
|
-
lh_nov: 'November'
|
794
|
-
lh_dec: 'December'
|
763
|
+
# FlatPickr human friendly formatting
|
764
|
+
fpr_human_friendly_date_format: M j, Y
|
765
|
+
fpr_human_friendly_date_time_format: M j, Y at H:i
|
795
766
|
date_range: Date Range
|
796
767
|
default: Default
|
797
768
|
default_country_cannot_be_deleted: Default country cannot be deleted
|
@@ -850,6 +821,7 @@ en:
|
|
850
821
|
blank: can't be blank
|
851
822
|
could_not_create_taxon: Could not create taxon
|
852
823
|
no_shipping_methods_available: No shipping methods available for selected location, please change your address and try again.
|
824
|
+
cannot_remove_icon: Cannot remove image
|
853
825
|
services:
|
854
826
|
get_shipping_rates:
|
855
827
|
no_shipping_address: To generate Shipping Rates Order needs to have a Shipping Address
|
@@ -900,7 +872,7 @@ en:
|
|
900
872
|
flat_rate_per_order: Flat Rate
|
901
873
|
flexible_rate: Flexible Rate
|
902
874
|
follow_us: Follow us
|
903
|
-
|
875
|
+
footer: Footer
|
904
876
|
forgot_password: Forgot password?
|
905
877
|
free: Free
|
906
878
|
free_shipping: Free Shipping
|
@@ -925,24 +897,6 @@ en:
|
|
925
897
|
hide_from_subcategories_nav: Hide from subcategories navigation
|
926
898
|
home: Home
|
927
899
|
home_page: homepage
|
928
|
-
homepage:
|
929
|
-
bestsellers: BESTSELLERS
|
930
|
-
fashion_trends: FASHION TRENDS
|
931
|
-
fashion_trends_note: Want to rock this season’s hottest trend in style? These are the top fashion from Summer 2020 Fashion Weeks that are coming our way this season.
|
932
|
-
men: MEN
|
933
|
-
new: NEW
|
934
|
-
new_collection: NEW COLLECTION
|
935
|
-
read_more: READ MORE
|
936
|
-
shoes: SHOES
|
937
|
-
shop_now: SHOP NOW
|
938
|
-
sportswear: SPORTSWEAR
|
939
|
-
streetstyle: STREETSTYLE
|
940
|
-
summer_2020: Summer 2020
|
941
|
-
summer_collection: Summer Collection
|
942
|
-
summer_sale: SUMMER SALE
|
943
|
-
trending: TRENDING
|
944
|
-
up_to_60: UP TO 60%
|
945
|
-
women: WOMEN
|
946
900
|
help_center: Help Center
|
947
901
|
i18n:
|
948
902
|
available_locales: Available Locales
|
@@ -958,8 +912,6 @@ en:
|
|
958
912
|
supported_locales: Supported Locales
|
959
913
|
this_file_language: English (US)
|
960
914
|
translations: Translations
|
961
|
-
checkout_zone_warning_html: "Selecting a Zone will limit customers on Checkout to Addresses in Countries in that Zone. <br />
|
962
|
-
Please see documentation: <a href='https://guides.spreecommerce.org/user/configuration/configuring_geography.html#zones' target='_blank' class='alert-link'>https://guides.spreecommerce.org/user/configuration/configuring_geography.html#zones</a>"
|
963
915
|
icon: Icon
|
964
916
|
image: Image
|
965
917
|
images: Images
|
@@ -1131,6 +1083,7 @@ en:
|
|
1131
1083
|
no_available_date_set: No available date set
|
1132
1084
|
no_country: No country set
|
1133
1085
|
no_payment_found: No payment found
|
1086
|
+
no_payment_provider_settings_message: This payment provider has no custom settings available
|
1134
1087
|
no_pending_payments: No pending payments
|
1135
1088
|
no_product_available:
|
1136
1089
|
for_this_quantity: Sorry, it looks like some products are not available in selected quantity.
|
@@ -1153,6 +1106,7 @@ en:
|
|
1153
1106
|
not_found: ! '%{resource} is not found'
|
1154
1107
|
note: Note
|
1155
1108
|
notice_messages:
|
1109
|
+
icon_removed: Image has been successfully removed
|
1156
1110
|
prices_saved: Prices successfully saved
|
1157
1111
|
product_cloned: Product has been cloned
|
1158
1112
|
product_deleted: Product has been deleted
|
@@ -1253,6 +1207,7 @@ en:
|
|
1253
1207
|
payment_processing_failed: Payment could not be processed, please check the details you entered
|
1254
1208
|
payment_processor_choose_banner_text: If you need help choosing a payment processor, please visit
|
1255
1209
|
payment_processor_choose_link: our payments page
|
1210
|
+
payment_provider_settings: Payment Provider Settings
|
1256
1211
|
payment_state: Payment State
|
1257
1212
|
payment_states:
|
1258
1213
|
balance_due: balance due
|
@@ -1437,6 +1392,7 @@ en:
|
|
1437
1392
|
rejected: Rejected
|
1438
1393
|
remember_me: Remember me
|
1439
1394
|
remove: Remove
|
1395
|
+
remove_image: Remove Image
|
1440
1396
|
rename: Rename
|
1441
1397
|
report: Report
|
1442
1398
|
reports: Reports
|
@@ -1512,12 +1468,14 @@ en:
|
|
1512
1468
|
select_a_return_authorization_reason: Select a reason for the return authorization
|
1513
1469
|
select_a_stock_location: Select a stock location
|
1514
1470
|
select_a_store_credit_reason: Select a reason for the store credit
|
1471
|
+
select_an_option: Select an option
|
1515
1472
|
select_stock: Select stock
|
1516
1473
|
selected_quantity_not_available: ! 'selected of %{item} is not available.'
|
1517
|
-
seo: SEO
|
1518
1474
|
send_copy_of_all_mails_to: Send Copy of All Mails To
|
1519
1475
|
send_mails_as: Send Mails As
|
1520
|
-
|
1476
|
+
seo: SEO
|
1477
|
+
seo_robots: SEO Robots
|
1478
|
+
seo_title: SEO Title
|
1521
1479
|
server: Server
|
1522
1480
|
server_error: The server returned an error
|
1523
1481
|
settings: Settings
|
@@ -1577,7 +1535,7 @@ en:
|
|
1577
1535
|
show_only_considered_risky: Only show risky orders
|
1578
1536
|
show_property: Show Property
|
1579
1537
|
show_rate_in_label: Show rate in label
|
1580
|
-
|
1538
|
+
show_store_selector:
|
1581
1539
|
short: Show Store selector
|
1582
1540
|
long: Display the Store selector in the main nav bar of Storefront and allow users to change Store and Currency
|
1583
1541
|
sign_up: Sign Up
|
@@ -1653,6 +1611,18 @@ en:
|
|
1653
1611
|
unable_to_create: Unable to create store.
|
1654
1612
|
unable_to_update: Unable to update store.
|
1655
1613
|
unable_to_delete: Unable to delete store.
|
1614
|
+
store_form:
|
1615
|
+
code_help: "Store unique identifier, which is an abbreviated version of the store’s name (used as the layout directory name, and also helpful for separating templates by store)"
|
1616
|
+
checkout_zone_help: "Selecting zone will limit to which Countries or States products are shipped.
|
1617
|
+
For more information <a href='https://guides.spreecommerce.org/user/configuration/configuring_geography.html#zones' target='_blank' class='alert-link'>please see documentation</a>"
|
1618
|
+
locales_help: "Install <a href='https://github.com/spree-contrib/spree_i18n target='_blank' class='alert-link'>Spree I18n extension</a> to add more locales"
|
1619
|
+
social_help: "If you want to link to your social accounts in the footer part of your website please fill below fields"
|
1620
|
+
default_country_help: "This is the Country that will be pre-selected on the Checkout Address form"
|
1621
|
+
footer_help: "This content is visible in the footer section of your Store"
|
1622
|
+
mail_from_address_help: "This is the email which will be the sender of all your Store emails (Order Confirmation, Shipment notification etc)"
|
1623
|
+
customer_support_email_help: "This email is visible to your Store visitors in the Footer section"
|
1624
|
+
new_order_notifications_email_help: "If you want to receive an email notification every time someone places an Order please provide an email address for that notification to be sent to"
|
1625
|
+
seo_robots: "Please check <a href='https://developers.google.com/search/reference/robots_meta_tag' target='_blank'>this page for more help</a>"
|
1656
1626
|
store_set_default_button: Set as default
|
1657
1627
|
stores: Stores
|
1658
1628
|
store_credit_name: Store Credit
|
@@ -1702,6 +1672,7 @@ en:
|
|
1702
1672
|
summary: Summary
|
1703
1673
|
supported_currencies: Supported Currencies
|
1704
1674
|
supported_currencies_long: A comma separated list of supported currencies
|
1675
|
+
supported_locales: Supported Locales
|
1705
1676
|
tax: Tax
|
1706
1677
|
tax_included: "Tax (incl.)"
|
1707
1678
|
tax_categories: Tax Categories
|
data/config/routes.rb
CHANGED
data/db/default/spree/stores.rb
CHANGED
@@ -11,6 +11,7 @@ else
|
|
11
11
|
s.customer_support_email = 'support@example.com'
|
12
12
|
s.default_currency = 'USD'
|
13
13
|
s.default_country_id = Spree::Config[:default_country_id]
|
14
|
+
s.default_locale = I18n.locale
|
14
15
|
s.seo_title = 'Spree Commerce Demo Shop'
|
15
16
|
s.meta_description = 'This is the new Spree UX DEMO | OVERVIEW: http://bit.ly/new-spree-ux | DOCS: http://bit.ly/spree-ux-customization-docs | CONTACT: https://spreecommerce.org/contact/'
|
16
17
|
s.facebook = 'spreecommerce'
|
data/db/default/spree/zones.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
eu_vat = Spree::Zone.where(name: 'EU_VAT', description: 'Countries that make up the EU VAT zone.', kind: 'country').first_or_create!
|
2
|
+
uk_vat = Spree::Zone.where(name: 'UK_VAT', kind: 'country').first_or_create!
|
2
3
|
north_america = Spree::Zone.where(name: 'North America', description: 'USA + Canada', kind: 'country').first_or_create!
|
3
4
|
south_america = Spree::Zone.where(name: 'South America', description: 'South America', kind: 'country').first_or_create!
|
4
5
|
middle_east = Spree::Zone.where(name: 'Middle East', description: 'Middle East', kind: 'country').first_or_create!
|
5
6
|
asia = Spree::Zone.where(name: 'Asia', description: 'Asia', kind: 'country').first_or_create!
|
6
7
|
|
7
|
-
%w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG
|
8
|
+
%w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG LT CY LU MT DK NL EE HR CZ GR).each do |name|
|
8
9
|
eu_vat.zone_members.where(zoneable: Spree::Country.find_by!(iso: name)).first_or_create!
|
9
10
|
end
|
10
11
|
|
12
|
+
uk_vat.zone_members.where(zoneable: Spree::Country.find_by(iso: 'GB')).first_or_create!
|
13
|
+
|
11
14
|
%w(US CA).each do |name|
|
12
15
|
north_america.zone_members.where(zoneable: Spree::Country.find_by!(iso: name)).first_or_create!
|
13
16
|
end
|
@@ -2,6 +2,7 @@ class AddSupportedCurrenciesToStore < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
unless column_exists?(:spree_stores, :supported_currencies)
|
4
4
|
add_column :spree_stores, :supported_currencies, :string
|
5
|
+
Spree::Store.reset_column_information
|
5
6
|
Spree::Store.all.each do |store|
|
6
7
|
store.update_attribute(:supported_currencies, store.default_currency)
|
7
8
|
end
|
@@ -1,6 +1,10 @@
|
|
1
1
|
class AddFilterableColumnToSpreeOptionTypes < ActiveRecord::Migration[6.0]
|
2
2
|
def change
|
3
|
-
|
4
|
-
|
3
|
+
unless column_exists?(:spree_option_types, :filterable)
|
4
|
+
add_column :spree_option_types, :filterable, :boolean, default: true, null: false
|
5
|
+
end
|
6
|
+
unless index_exists?(:spree_option_types, :filterable)
|
7
|
+
add_index :spree_option_types, :filterable
|
8
|
+
end
|
5
9
|
end
|
6
10
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class CreateSpreePaymentMethodsStores < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :spree_payment_methods_stores, id: false do |t|
|
4
|
+
t.belongs_to :payment_method
|
5
|
+
t.belongs_to :store
|
6
|
+
end
|
7
|
+
|
8
|
+
add_index :spree_payment_methods_stores, [:payment_method_id, :store_id], unique: true, name: 'payment_mentod_id_store_id_unique_index'
|
9
|
+
end
|
10
|
+
end
|