solidus_core 4.1.6 → 4.5.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/images/logo/solidus.svg +18 -1
- data/app/assets/images/logo/solidus_logo.png +0 -0
- data/app/helpers/spree/base_helper.rb +2 -2
- data/app/helpers/spree/core/controller_helpers/auth.rb +66 -0
- data/app/helpers/spree/core/controller_helpers/common.rb +82 -0
- data/app/helpers/spree/core/controller_helpers/order.rb +86 -0
- data/app/helpers/spree/core/controller_helpers/payment_parameters.rb +165 -0
- data/app/helpers/spree/core/controller_helpers/pricing.rb +19 -0
- data/app/helpers/spree/core/controller_helpers/search.rb +16 -0
- data/app/helpers/spree/core/controller_helpers/store.rb +19 -0
- data/app/helpers/spree/core/controller_helpers/strong_parameters.rb +74 -0
- data/app/mailers/spree/base_mailer.rb +1 -1
- data/app/mailers/spree/carton_mailer.rb +1 -1
- data/app/mailers/spree/order_mailer.rb +3 -3
- data/app/mailers/spree/reimbursement_mailer.rb +1 -1
- data/app/models/concerns/spree/active_storage_adapter/normalization.rb +1 -1
- data/app/models/concerns/spree/active_storage_adapter.rb +1 -1
- data/app/models/concerns/spree/display_money.rb +1 -1
- data/app/models/concerns/spree/metadata.rb +64 -0
- data/app/models/concerns/spree/named_type.rb +2 -0
- data/app/models/concerns/spree/ordered_property_value_list.rb +2 -2
- data/app/models/concerns/spree/user_address_book.rb +8 -9
- data/app/models/concerns/spree/user_methods.rb +3 -3
- data/app/models/spree/address.rb +10 -8
- data/app/models/spree/adjustment.rb +15 -65
- data/app/models/spree/adjustment_reason.rb +2 -0
- data/app/models/spree/calculator/returns/default_refund_amount.rb +1 -1
- data/app/models/spree/carton.rb +2 -2
- data/app/models/spree/core/state_machines/inventory_unit.rb +42 -0
- data/app/models/spree/core/state_machines/order/class_methods.rb +217 -0
- data/app/models/spree/core/state_machines/order.rb +42 -0
- data/app/models/spree/core/state_machines/payment.rb +61 -0
- data/app/models/spree/core/state_machines/reimbursement.rb +33 -0
- data/app/models/spree/core/state_machines/return_authorization.rb +32 -0
- data/app/models/spree/core/state_machines/return_item/acceptance_status.rb +51 -0
- data/app/models/spree/core/state_machines/return_item/reception_status.rb +42 -0
- data/app/models/spree/core/state_machines/shipment.rb +58 -0
- data/app/models/spree/credit_card.rb +12 -9
- data/app/models/spree/customer_return.rb +2 -0
- data/app/models/spree/deprecated_configurable_class.rb +40 -0
- data/app/models/spree/fulfilment_changer.rb +4 -4
- data/app/models/spree/inventory_unit.rb +2 -2
- data/app/models/spree/item_total.rb +28 -0
- data/app/models/spree/legacy_user.rb +1 -0
- data/app/models/spree/line_item.rb +22 -4
- data/app/models/spree/money.rb +120 -0
- data/app/models/spree/null_promotion_adjuster.rb +13 -0
- data/app/models/spree/null_promotion_advertiser.rb +9 -0
- data/app/models/spree/null_promotion_finder.rb +9 -0
- data/app/models/spree/null_promotion_handler.rb +44 -0
- data/app/models/spree/option_value.rb +1 -0
- data/app/models/spree/order.rb +54 -36
- data/app/models/spree/order_cancellations.rb +8 -8
- data/app/models/spree/order_inventory.rb +6 -4
- data/app/models/spree/order_merger.rb +1 -1
- data/app/models/spree/order_mutex.rb +2 -2
- data/app/models/spree/order_shipping.rb +9 -9
- data/app/models/spree/order_taxation.rb +1 -0
- data/app/models/spree/order_updater.rb +19 -40
- data/app/models/spree/payment/processing.rb +2 -2
- data/app/models/spree/payment.rb +3 -2
- data/app/models/spree/payment_create.rb +1 -1
- data/app/models/spree/payment_method/bogus_credit_card.rb +14 -9
- data/app/models/spree/payment_method/simple_bogus_credit_card.rb +12 -6
- data/app/models/spree/payment_method/store_credit.rb +1 -1
- data/app/models/spree/payment_method.rb +3 -1
- data/app/models/spree/payment_source.rb +5 -1
- data/app/models/spree/permission_set.rb +11 -0
- data/app/models/spree/permission_sets/base.rb +45 -0
- data/app/models/spree/permission_sets/configuration_display.rb +53 -0
- data/app/models/spree/permission_sets/configuration_management.rb +52 -0
- data/app/models/spree/permission_sets/dashboard_display.rb +28 -0
- data/app/models/spree/permission_sets/default_customer.rb +83 -0
- data/app/models/spree/permission_sets/order_display.rb +50 -0
- data/app/models/spree/permission_sets/order_management.rb +50 -0
- data/app/models/spree/permission_sets/product_display.rb +43 -0
- data/app/models/spree/permission_sets/product_management.rb +47 -0
- data/app/models/spree/permission_sets/restricted_stock_display.rb +33 -0
- data/app/models/spree/permission_sets/restricted_stock_management.rb +33 -0
- data/app/models/spree/permission_sets/stock_display.rb +26 -0
- data/app/models/spree/permission_sets/stock_management.rb +26 -0
- data/app/models/spree/permission_sets/super_user.rb +26 -0
- data/app/models/spree/permission_sets/user_display.rb +27 -0
- data/app/models/spree/permission_sets/user_management.rb +44 -0
- data/app/models/spree/preference.rb +1 -1
- data/app/models/spree/product.rb +13 -9
- data/app/models/spree/refund.rb +3 -1
- data/app/models/spree/refund_reason.rb +6 -1
- data/app/models/spree/reimbursement.rb +4 -4
- data/app/models/spree/reimbursement_performer.rb +3 -3
- data/app/models/spree/reimbursement_tax_calculator.rb +2 -2
- data/app/models/spree/reimbursement_type/credit.rb +1 -1
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +6 -6
- data/app/models/spree/reimbursement_type/store_credit.rb +1 -1
- data/app/models/spree/reimbursement_type.rb +6 -1
- data/app/models/spree/return_authorization.rb +2 -0
- data/app/models/spree/return_item.rb +10 -10
- data/app/models/spree/return_reason.rb +6 -1
- data/app/models/spree/role.rb +3 -1
- data/app/models/spree/role_permission.rb +8 -0
- data/app/models/spree/shipment.rb +9 -7
- data/app/models/spree/shipping_category.rb +2 -0
- data/app/models/spree/shipping_rate.rb +2 -3
- data/app/models/spree/{order_contents.rb → simple_order_contents.rb} +8 -12
- data/app/models/spree/stock/estimator.rb +1 -1
- data/app/models/spree/stock/inventory_unit_builder.rb +1 -1
- data/app/models/spree/stock/package.rb +2 -2
- data/app/models/spree/stock/simple_coordinator.rb +36 -22
- data/app/models/spree/stock_item.rb +1 -0
- data/app/models/spree/stock_location.rb +5 -5
- data/app/models/spree/store.rb +3 -1
- data/app/models/spree/store_credit.rb +17 -15
- data/app/models/spree/store_credit_event.rb +4 -3
- data/app/models/spree/store_credit_reason.rb +6 -1
- data/app/models/spree/store_selector/by_server_name.rb +1 -1
- data/app/models/spree/tax/tax_helpers.rb +12 -1
- data/app/models/spree/tax_calculator/default.rb +3 -3
- data/app/models/spree/tax_calculator/shipping_rate.rb +1 -1
- data/app/models/spree/tax_category.rb +3 -1
- data/app/models/spree/tax_rate.rb +7 -3
- data/app/models/spree/taxon.rb +22 -2
- data/app/models/spree/taxon_brand_selector.rb +22 -0
- data/app/models/spree/taxonomy.rb +2 -2
- data/app/models/spree/unauthorized_redirect_handler.rb +24 -0
- data/app/models/spree/unit_cancel.rb +1 -2
- data/app/models/spree/user_address.rb +9 -3
- data/app/models/spree/variant/scopes.rb +4 -0
- data/app/models/spree/variant/vat_price_generator.rb +1 -1
- data/app/models/spree/variant.rb +21 -8
- data/app/models/spree/wallet.rb +2 -2
- data/app/views/spree/order_mailer/cancel_email.html.erb +1 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.html.erb +5 -5
- data/app/views/spree/order_mailer/confirm_email.text.erb +5 -5
- data/app/views/spree/order_mailer/inventory_cancellation_email.html.erb +0 -1
- data/config/locales/en.yml +33 -90
- data/db/default/spree/permission_sets.rb +10 -0
- data/db/default/spree/return_reasons.rb +3 -1
- data/db/default/spree/states.rb +1 -1
- data/db/migrate/20160101010000_solidus_one_four.rb +0 -127
- data/db/migrate/20220419170826_remove_archived_user_addresses.rb +12 -0
- data/db/migrate/20230427095534_drop_deprecated_address_id_from_shipments.rb +1 -1
- data/db/migrate/20240821173254_create_spree_permission_sets_in_core.rb +9 -0
- data/db/migrate/20240821173341_create_spree_roles_permissions_in_core.rb +9 -0
- data/db/migrate/20240821173641_add_description_to_spree_roles.rb +5 -0
- data/db/migrate/20240904152041_add_privilege_and_category_to_spree_permission_sets.rb +6 -0
- data/db/migrate/20250129061658_add_metadata_to_spree_resources.rb +28 -0
- data/db/migrate/20250201172950_add_gtin_and_condition_to_spree_variant.rb +6 -0
- data/db/migrate/20250207104016_add_primary_taxon_to_products.rb +7 -0
- data/db/migrate/20250221152004_add_metadata_to_users.rb +13 -0
- data/db/seeds.rb +1 -0
- data/lib/generators/solidus/install/app_templates/authentication/custom.rb +0 -5
- data/lib/generators/solidus/install/app_templates/frontend/starter.rb +1 -1
- data/lib/generators/solidus/install/install_generator.rb +64 -15
- data/lib/generators/solidus/install/templates/config/initializers/spree.rb.tt +15 -12
- data/lib/generators/solidus/update/update_generator.rb +1 -1
- data/lib/generators/spree/dummy/dummy_generator.rb +1 -1
- data/lib/generators/spree/dummy/templates/rails/application.rb.tt +1 -1
- data/lib/generators/spree/dummy/templates/rails/database.yml +41 -93
- data/lib/generators/spree/dummy/templates/rails/manifest.js +3 -0
- data/lib/generators/spree/dummy/templates/rails/test.rb +6 -1
- data/lib/spree/app_configuration.rb +102 -67
- data/lib/spree/core/class_constantizer.rb +2 -2
- data/lib/spree/core/controller_helpers/auth.rb +5 -61
- data/lib/spree/core/controller_helpers/common.rb +5 -80
- data/lib/spree/core/controller_helpers/order.rb +5 -86
- data/lib/spree/core/controller_helpers/payment_parameters.rb +5 -163
- data/lib/spree/core/controller_helpers/pricing.rb +5 -17
- data/lib/spree/core/controller_helpers/search.rb +5 -14
- data/lib/spree/core/controller_helpers/store.rb +5 -17
- data/lib/spree/core/controller_helpers/strong_parameters.rb +5 -71
- data/lib/spree/core/engine.rb +13 -5
- data/lib/spree/core/environment/calculators.rb +35 -3
- data/lib/spree/core/environment/promotions.rb +25 -4
- data/lib/spree/core/environment_extension.rb +16 -2
- data/lib/spree/core/importer/order.rb +5 -5
- data/lib/spree/core/importer/product.rb +3 -3
- data/lib/spree/core/nested_class_set.rb +28 -0
- data/lib/spree/core/null_promotion_configuration.rb +84 -0
- data/lib/spree/core/product_filters.rb +1 -1
- data/lib/spree/core/search/variant.rb +2 -2
- data/lib/spree/core/state_machines/inventory_unit.rb +5 -40
- data/lib/spree/core/state_machines/order.rb +5 -251
- data/lib/spree/core/state_machines/payment.rb +5 -59
- data/lib/spree/core/state_machines/reimbursement.rb +5 -31
- data/lib/spree/core/state_machines/return_authorization.rb +5 -30
- data/lib/spree/core/state_machines/return_item/acceptance_status.rb +5 -49
- data/lib/spree/core/state_machines/return_item/reception_status.rb +5 -40
- data/lib/spree/core/state_machines/shipment.rb +5 -56
- data/lib/spree/core/state_machines.rb +48 -81
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +2 -2
- data/lib/spree/core.rb +2 -14
- data/lib/spree/deprecator.rb +9 -0
- data/lib/spree/i18n.rb +1 -1
- data/lib/spree/mailer_previews/carton_preview.rb +1 -1
- data/lib/spree/money.rb +5 -118
- data/lib/spree/permission_sets/base.rb +5 -30
- data/lib/spree/permission_sets/configuration_display.rb +5 -41
- data/lib/spree/permission_sets/configuration_management.rb +5 -40
- data/lib/spree/permission_sets/dashboard_display.rb +5 -14
- data/lib/spree/permission_sets/default_customer.rb +5 -71
- data/lib/spree/permission_sets/order_display.rb +5 -38
- data/lib/spree/permission_sets/order_management.rb +5 -38
- data/lib/spree/permission_sets/product_display.rb +5 -31
- data/lib/spree/permission_sets/product_management.rb +5 -35
- data/lib/spree/permission_sets/restricted_stock_display.rb +5 -21
- data/lib/spree/permission_sets/restricted_stock_management.rb +5 -21
- data/lib/spree/permission_sets/stock_display.rb +5 -14
- data/lib/spree/permission_sets/stock_management.rb +5 -14
- data/lib/spree/permission_sets/super_user.rb +5 -14
- data/lib/spree/permission_sets/user_display.rb +5 -15
- data/lib/spree/permission_sets/user_management.rb +5 -32
- data/lib/spree/permission_sets.rb +5 -18
- data/lib/spree/permitted_attributes.rb +21 -9
- data/lib/spree/preferences/configuration.rb +4 -0
- data/lib/spree/preferences/persistable.rb +7 -1
- data/lib/spree/preferences/store.rb +2 -2
- data/lib/spree/testing_support/capybara_ext.rb +11 -1
- data/lib/spree/testing_support/common_rake.rb +1 -0
- data/lib/spree/testing_support/dummy_ability.rb +7 -0
- data/lib/spree/testing_support/dummy_app/assets/stylesheets/solidus_admin/tailwind.css +1 -0
- data/lib/spree/testing_support/dummy_app/database.yml +37 -46
- data/lib/spree/testing_support/dummy_app/migrations.rb +8 -15
- data/lib/spree/testing_support/dummy_app/rake_tasks.rb +3 -6
- data/lib/spree/testing_support/dummy_app.rb +33 -19
- data/lib/spree/testing_support/factories/adjustment_factory.rb +1 -2
- data/lib/spree/testing_support/factories/calculator_factory.rb +1 -5
- data/lib/spree/testing_support/factories/carton_factory.rb +2 -2
- data/lib/spree/testing_support/factories/customer_return_factory.rb +2 -2
- data/lib/spree/testing_support/factories/inventory_unit_factory.rb +3 -3
- data/lib/spree/testing_support/factories/order_factory.rb +13 -24
- data/lib/spree/testing_support/factories/product_factory.rb +1 -1
- data/lib/spree/testing_support/factories/shipment_factory.rb +1 -1
- data/lib/spree/testing_support/factories/stock_item_factory.rb +5 -1
- data/lib/spree/testing_support/factories/stock_package_factory.rb +1 -1
- data/lib/spree/testing_support/factories/user_factory.rb +1 -1
- data/lib/spree/testing_support/factories/zone_factory.rb +1 -1
- data/lib/spree/testing_support/order_walkthrough.rb +3 -3
- data/lib/spree/testing_support/shared_examples/calculator.rb +10 -0
- data/lib/spree/testing_support/shared_examples/order_factory.rb +141 -0
- data/lib/spree/testing_support/shared_examples/working_factory.rb +15 -0
- data/lib/tasks/colorado_delivery_fee.rake +2 -2
- data/solidus_core.gemspec +7 -10
- metadata +107 -109
- data/app/jobs/spree/promotion_code_batch_job.rb +0 -26
- data/app/mailers/spree/promotion_code_batch_mailer.rb +0 -15
- data/app/models/spree/calculator/distributed_amount.rb +0 -33
- data/app/models/spree/calculator/flat_percent_item_total.rb +0 -23
- data/app/models/spree/calculator/flexi_rate.rb +0 -22
- data/app/models/spree/calculator/percent_on_line_item.rb +0 -13
- data/app/models/spree/calculator/tiered_flat_rate.rb +0 -52
- data/app/models/spree/calculator/tiered_percent.rb +0 -62
- data/app/models/spree/line_item_action.rb +0 -8
- data/app/models/spree/order_promotion.rb +0 -27
- data/app/models/spree/promotion/actions/create_adjustment.rb +0 -81
- data/app/models/spree/promotion/actions/create_item_adjustments.rb +0 -98
- data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +0 -139
- data/app/models/spree/promotion/actions/free_shipping.rb +0 -59
- data/app/models/spree/promotion/order_adjustments_recalculator.rb +0 -92
- data/app/models/spree/promotion/rules/first_order.rb +0 -38
- data/app/models/spree/promotion/rules/first_repeat_purchase_since.rb +0 -36
- data/app/models/spree/promotion/rules/item_total.rb +0 -86
- data/app/models/spree/promotion/rules/nth_order.rb +0 -45
- data/app/models/spree/promotion/rules/one_use_per_user.rb +0 -25
- data/app/models/spree/promotion/rules/option_value.rb +0 -50
- data/app/models/spree/promotion/rules/product.rb +0 -86
- data/app/models/spree/promotion/rules/store.rb +0 -26
- data/app/models/spree/promotion/rules/taxon.rb +0 -91
- data/app/models/spree/promotion/rules/user.rb +0 -34
- data/app/models/spree/promotion/rules/user_logged_in.rb +0 -20
- data/app/models/spree/promotion/rules/user_role.rb +0 -45
- data/app/models/spree/promotion.rb +0 -271
- data/app/models/spree/promotion_action.rb +0 -47
- data/app/models/spree/promotion_category.rb +0 -8
- data/app/models/spree/promotion_chooser.rb +0 -34
- data/app/models/spree/promotion_code/batch_builder.rb +0 -64
- data/app/models/spree/promotion_code.rb +0 -54
- data/app/models/spree/promotion_code_batch.rb +0 -27
- data/app/models/spree/promotion_handler/cart.rb +0 -75
- data/app/models/spree/promotion_handler/coupon.rb +0 -123
- data/app/models/spree/promotion_handler/page.rb +0 -26
- data/app/models/spree/promotion_handler/shipping.rb +0 -61
- data/app/models/spree/promotion_rule.rb +0 -55
- data/app/models/spree/promotion_rule_role.rb +0 -8
- data/app/models/spree/promotion_rule_store.rb +0 -10
- data/app/models/spree/promotion_rule_taxon.rb +0 -8
- data/app/models/spree/promotion_rule_user.rb +0 -10
- data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_errored.text.erb +0 -2
- data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_finished.text.erb +0 -2
- data/bin/rails +0 -13
- data/db/migrate/20161017102621_create_spree_promotion_code_batch.rb +0 -38
- data/db/migrate/20180202190713_create_promotion_rule_stores.rb +0 -12
- data/db/migrate/20180328172631_add_join_characters_to_promotion_code_batch.rb +0 -11
- data/db/migrate/20190106184413_remove_code_from_spree_promotions.rb +0 -42
- data/db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb +0 -20
- data/db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb +0 -5
- data/db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb +0 -6
- data/db/migrate/20230325161633_drop_unused_promo_action_line_items.rb +0 -13
- data/lib/generators/spree/dummy/templates/rails/script/rails +0 -6
- data/lib/solidus/migrations/promotions_with_code_handlers.rb +0 -66
- data/lib/spree/permission_sets/promotion_display.rb +0 -25
- data/lib/spree/permission_sets/promotion_management.rb +0 -25
- data/lib/spree/testing_support/factories/order_promotion_factory.rb +0 -8
- data/lib/spree/testing_support/factories/promotion_category_factory.rb +0 -7
- data/lib/spree/testing_support/factories/promotion_code_factory.rb +0 -8
- data/lib/spree/testing_support/factories/promotion_factory.rb +0 -98
data/app/models/spree/variant.rb
CHANGED
@@ -28,6 +28,10 @@ module Spree
|
|
28
28
|
attr_writer :rebuild_vat_prices
|
29
29
|
include Spree::DefaultPrice
|
30
30
|
|
31
|
+
# Consider that not all platforms digest structured data in the same way,
|
32
|
+
# you might have to modify the output on the frontend or in feeds accordingly.
|
33
|
+
enum :condition, { damaged: "damaged", new: "new", refurbished: "refurbished", used: "used" }, prefix: true
|
34
|
+
|
31
35
|
belongs_to :product, -> { with_discarded }, touch: true, class_name: 'Spree::Product', inverse_of: :variants_including_master, optional: false
|
32
36
|
belongs_to :tax_category, class_name: 'Spree::TaxCategory', optional: true
|
33
37
|
belongs_to :shipping_category, class_name: "Spree::ShippingCategory", optional: true
|
@@ -35,7 +39,7 @@ module Spree
|
|
35
39
|
delegate :name, :description, :slug, :available_on, :discontinue_on, :discontinued?,
|
36
40
|
:meta_description, :meta_keywords,
|
37
41
|
to: :product
|
38
|
-
delegate :tax_category, to: :product, prefix: true
|
42
|
+
delegate :tax_category, :tax_category_id, to: :product, prefix: true
|
39
43
|
delegate :shipping_category, :shipping_category_id,
|
40
44
|
to: :product, prefix: true
|
41
45
|
delegate :tax_rates, to: :tax_category
|
@@ -73,7 +77,6 @@ module Spree
|
|
73
77
|
validates_uniqueness_of :sku, allow_blank: true, case_sensitive: true, conditions: -> { where(deleted_at: nil) }, if: :enforce_unique_sku?
|
74
78
|
|
75
79
|
after_create :create_stock_items
|
76
|
-
after_create :set_position
|
77
80
|
after_create :set_master_out_of_stock, unless: :is_master?
|
78
81
|
|
79
82
|
after_save :clear_in_stock_cache
|
@@ -81,6 +84,11 @@ module Spree
|
|
81
84
|
|
82
85
|
after_destroy :destroy_option_values_variants
|
83
86
|
|
87
|
+
scope :template_variants, -> do
|
88
|
+
left_joins(product: { option_types: :option_values }).where(is_master: true).where.not(spree_option_values: { id: nil }).reorder(nil).distinct
|
89
|
+
end
|
90
|
+
scope :non_template_variants, -> { where.not(id: template_variants) }
|
91
|
+
|
84
92
|
# Returns variants that are in stock. When stock locations are provided as
|
85
93
|
# a parameter, the scope is limited to variants that are in stock in the
|
86
94
|
# provided stock locations.
|
@@ -95,7 +103,7 @@ module Spree
|
|
95
103
|
if stock_locations.present?
|
96
104
|
in_stock_variants = in_stock_variants.where(spree_stock_items: { stock_location_id: stock_locations.map(&:id) })
|
97
105
|
end
|
98
|
-
in_stock_variants
|
106
|
+
in_stock_variants.distinct
|
99
107
|
end
|
100
108
|
|
101
109
|
# Returns a scope of Variants which are suppliable. This includes:
|
@@ -146,6 +154,15 @@ module Spree
|
|
146
154
|
super || product_tax_category
|
147
155
|
end
|
148
156
|
|
157
|
+
# @return [Integer] the variant's tax category ID
|
158
|
+
#
|
159
|
+
# This returns the product's tax category ID if the tax category ID on the variant is nil. It looks
|
160
|
+
# like an association, but really is an override.
|
161
|
+
#
|
162
|
+
def tax_category_id
|
163
|
+
super || product_tax_category_id
|
164
|
+
end
|
165
|
+
|
149
166
|
# @return [Spree::ShippingCategory] the variant's shipping category
|
150
167
|
#
|
151
168
|
# This returns the product's shipping category if the shipping category ID on the variant is nil. It looks
|
@@ -195,7 +212,7 @@ module Spree
|
|
195
212
|
#
|
196
213
|
# @return [String] a sentence-ified string of option values.
|
197
214
|
def options_text
|
198
|
-
values = option_values.
|
215
|
+
values = option_values.sort_by do |option_value|
|
199
216
|
option_value.option_type.position
|
200
217
|
end
|
201
218
|
|
@@ -406,10 +423,6 @@ module Spree
|
|
406
423
|
Spree::Config.variant_vat_prices_generator_class.new(self).run
|
407
424
|
end
|
408
425
|
|
409
|
-
def set_position
|
410
|
-
update_column(:position, product.variants.maximum(:position).to_i + 1)
|
411
|
-
end
|
412
|
-
|
413
426
|
def in_stock_cache_key
|
414
427
|
"variant-#{id}-in_stock"
|
415
428
|
end
|
data/app/models/spree/wallet.rb
CHANGED
@@ -28,7 +28,7 @@ class Spree::Wallet
|
|
28
28
|
# @param payment_source [PaymentSource] The payment source to add to the wallet
|
29
29
|
# @return [WalletPaymentSource] the generated WalletPaymentSource
|
30
30
|
def add(payment_source)
|
31
|
-
user.wallet_payment_sources.find_or_create_by!(payment_source:
|
31
|
+
user.wallet_payment_sources.find_or_create_by!(payment_source:)
|
32
32
|
end
|
33
33
|
|
34
34
|
# Remove a PaymentSource from the wallet.
|
@@ -37,7 +37,7 @@ class Spree::Wallet
|
|
37
37
|
# @raise [ActiveRecord::RecordNotFound] if the source is not in the wallet.
|
38
38
|
# @return [WalletPaymentSource] the destroyed WalletPaymentSource
|
39
39
|
def remove(payment_source)
|
40
|
-
user.wallet_payment_sources.find_by!(payment_source:
|
40
|
+
user.wallet_payment_sources.find_by!(payment_source:).destroy!
|
41
41
|
end
|
42
42
|
|
43
43
|
# Find a WalletPaymentSource in the wallet by id.
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<td><%= t('.subtotal') %></td>
|
27
27
|
<td><%= @order.display_item_total %></td>
|
28
28
|
</tr>
|
29
|
-
<% @order.adjustments.
|
29
|
+
<% @order.adjustments.each do |adjustment| %>
|
30
30
|
<tr>
|
31
31
|
<td></td>
|
32
32
|
<td><%= sanitize(adjustment.label) %></td>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
12
|
<%= t('.subtotal') %> <%= @order.display_item_total %>
|
13
|
-
<% @order.adjustments.
|
13
|
+
<% @order.adjustments.each do |adjustment| %>
|
14
14
|
<%= raw(adjustment.label) %> <%= adjustment.display_amount %>
|
15
15
|
<% end %>
|
16
16
|
<%= t('.total') %> <%= @order.display_total %>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
</td>
|
32
32
|
</tr>
|
33
33
|
<% if @order.line_item_adjustments.exists? %>
|
34
|
-
<% if @order.all_adjustments.promotion.
|
35
|
-
<% @order.all_adjustments.promotion.
|
34
|
+
<% if @order.all_adjustments.promotion.exists? %>
|
35
|
+
<% @order.all_adjustments.promotion.group_by(&:label).each do |label, adjustments| %>
|
36
36
|
<tr>
|
37
37
|
<td></td>
|
38
38
|
<td><%= t('spree.promotion') %> <%= label %>:</td>
|
@@ -48,8 +48,8 @@
|
|
48
48
|
<td><%= Spree::Money.new(shipments.sum(&:total_before_tax), currency: @order.currency) %></td>
|
49
49
|
</tr>
|
50
50
|
<% end %>
|
51
|
-
<% if @order.all_adjustments.
|
52
|
-
<% @order.all_adjustments.
|
51
|
+
<% if @order.all_adjustments.tax.exists? %>
|
52
|
+
<% @order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
53
53
|
<tr>
|
54
54
|
<td></td>
|
55
55
|
<td><%= t('spree.tax') %> <%= label %>:</td>
|
@@ -57,7 +57,7 @@
|
|
57
57
|
</tr>
|
58
58
|
<% end %>
|
59
59
|
<% end %>
|
60
|
-
<% @order.adjustments.
|
60
|
+
<% @order.adjustments.each do |adjustment| %>
|
61
61
|
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
62
62
|
<tr>
|
63
63
|
<td></td>
|
@@ -11,8 +11,8 @@
|
|
11
11
|
============================================================
|
12
12
|
<%= t('.subtotal') %> <%= @order.display_item_total %>
|
13
13
|
<% if @order.line_item_adjustments.exists? %>
|
14
|
-
<% if @order.all_adjustments.promotion.
|
15
|
-
<% @order.all_adjustments.promotion.
|
14
|
+
<% if @order.all_adjustments.promotion.exists? %>
|
15
|
+
<% @order.all_adjustments.promotion.group_by(&:label).each do |label, adjustments| %>
|
16
16
|
<%= t('spree.promotion') %>: <%= label %> <%= Spree::Money.new(adjustments.sum(&:amount), currency: @order.currency) %>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
@@ -22,13 +22,13 @@
|
|
22
22
|
<%= t('spree.shipping') %>: <%= name %> <%= Spree::Money.new(shipments.sum(&:total_before_tax), currency: @order.currency) %>
|
23
23
|
<% end %>
|
24
24
|
|
25
|
-
<% if @order.all_adjustments.
|
26
|
-
<% @order.all_adjustments.
|
25
|
+
<% if @order.all_adjustments.tax.exists? %>
|
26
|
+
<% @order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
27
27
|
<%= t('spree.tax') %>: <%= label %> <%= Spree::Money.new(adjustments.sum(&:amount), currency: @order.currency) %>
|
28
28
|
<% end %>
|
29
29
|
<% end %>
|
30
30
|
|
31
|
-
<% @order.adjustments.
|
31
|
+
<% @order.adjustments.each do |adjustment| %>
|
32
32
|
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
33
33
|
<%= adjustment.label %> <%= adjustment.display_amount %>
|
34
34
|
<% end %>
|
data/config/locales/en.yml
CHANGED
@@ -104,6 +104,7 @@ en:
|
|
104
104
|
additional_tax_total: Tax
|
105
105
|
approved_at: Approved at
|
106
106
|
approver_id: Approver
|
107
|
+
bill_address: Billing Address
|
107
108
|
canceled_at: Canceled at
|
108
109
|
canceler_id: Canceler
|
109
110
|
checkout_complete: Checkout Complete
|
@@ -117,6 +118,7 @@ en:
|
|
117
118
|
item_total: Item Total
|
118
119
|
number: Number
|
119
120
|
payment_state: Payment State
|
121
|
+
ship_address: Shipping Address
|
120
122
|
shipment_state: Shipment State
|
121
123
|
shipment_total: Ship Total
|
122
124
|
special_instructions: Special Instructions
|
@@ -164,11 +166,13 @@ en:
|
|
164
166
|
variant: Variant
|
165
167
|
spree/product:
|
166
168
|
available_on: Available On
|
169
|
+
condition: Master Condition
|
167
170
|
cost_currency: Cost Currency
|
168
171
|
cost_price: Cost Price
|
169
172
|
depth: Depth
|
170
173
|
description: Description
|
171
174
|
discontinue_on: Discontinue on
|
175
|
+
gtin: Master GTIN
|
172
176
|
height: Height
|
173
177
|
master_price: Master Price
|
174
178
|
meta_description: Meta Description
|
@@ -177,8 +181,11 @@ en:
|
|
177
181
|
name: Name
|
178
182
|
on_hand: On Hand
|
179
183
|
price: Master Price
|
184
|
+
primary_taxon: Primary Taxon
|
185
|
+
primary_taxon_id: Primary Taxon
|
180
186
|
promotionable: Promotable
|
181
187
|
shipping_category: Shipping Category
|
188
|
+
sku: Master SKU
|
182
189
|
slug: Slug
|
183
190
|
tax_category: Tax Category
|
184
191
|
weight: Weight
|
@@ -216,6 +223,8 @@ en:
|
|
216
223
|
description: Order total meets these criteria
|
217
224
|
spree/promotion/rules/landing_page:
|
218
225
|
description: Customer must have visited the specified page
|
226
|
+
spree/promotion/rules/minimum_quantity:
|
227
|
+
description: Order contains minimum quantity of applicable items
|
219
228
|
spree/promotion/rules/nth_order:
|
220
229
|
description: Apply a promotion to every nth order a user has completed.
|
221
230
|
form_text: 'Apply this promotion on the users Nth order: '
|
@@ -405,14 +414,17 @@ en:
|
|
405
414
|
analytics_id: Analytics ID
|
406
415
|
spree/user:
|
407
416
|
email: Email
|
417
|
+
last_active: Last active
|
408
418
|
lifetime_value: Total spent
|
409
419
|
password: Password
|
410
420
|
password_confirmation: Password Confirmation
|
411
421
|
spree_roles: Roles
|
412
422
|
spree/variant:
|
423
|
+
condition: Condition
|
413
424
|
cost_currency: Cost Currency
|
414
425
|
cost_price: Cost Price
|
415
426
|
depth: Depth
|
427
|
+
gtin: GTIN
|
416
428
|
height: Height
|
417
429
|
price: Price
|
418
430
|
shipping_category: Variant Shipping Category
|
@@ -651,6 +663,7 @@ en:
|
|
651
663
|
spree/promotion/rules/first_repeat_purchase_since: First Repeat Purchase Since
|
652
664
|
spree/promotion/rules/item_total: Item Total
|
653
665
|
spree/promotion/rules/landing_page: Landing Page
|
666
|
+
spree/promotion/rules/minimum_quantity: Minimum Quantity
|
654
667
|
spree/promotion/rules/nth_order: Nth Order
|
655
668
|
spree/promotion/rules/one_use_per_user: One Use Per User
|
656
669
|
spree/promotion/rules/option_value: Option Value(s)
|
@@ -871,27 +884,6 @@ en:
|
|
871
884
|
new_price: New Price
|
872
885
|
table:
|
873
886
|
variant_pricing: Variant Prices
|
874
|
-
promotion_status:
|
875
|
-
active: Active
|
876
|
-
expired: Expired
|
877
|
-
inactive: Inactive
|
878
|
-
not_started: Not started
|
879
|
-
promotions:
|
880
|
-
actions:
|
881
|
-
calculator_label: Calculated by
|
882
|
-
activations_edit:
|
883
|
-
auto: All orders will attempt to use this promotion
|
884
|
-
multiple_codes_html: This promotion uses %{count} promotion codes
|
885
|
-
single_code_html: 'This promotion uses the promotion code: <code>%{code}</code>'
|
886
|
-
activations_new:
|
887
|
-
auto: Apply to all orders
|
888
|
-
multiple_codes: Multiple promotion codes
|
889
|
-
single_code: Single promotion code
|
890
|
-
form:
|
891
|
-
activation: Activation
|
892
|
-
expires_at_placeholder: Never
|
893
|
-
general: General
|
894
|
-
starts_at_placeholder: Immediately
|
895
887
|
shipping_methods:
|
896
888
|
form:
|
897
889
|
stock_locations_placeholder: Choose stock locations
|
@@ -957,8 +949,6 @@ en:
|
|
957
949
|
overview: Overview
|
958
950
|
payments: Payments
|
959
951
|
products: Products
|
960
|
-
promotion_categories: Promotion Categories
|
961
|
-
promotions: Promotions
|
962
952
|
properties: Property Types
|
963
953
|
rma: RMA
|
964
954
|
settings: Settings
|
@@ -1060,8 +1050,6 @@ en:
|
|
1060
1050
|
back_to_payment_methods_list: Back To Payment Methods List
|
1061
1051
|
back_to_payments_list: Back To Payments List
|
1062
1052
|
back_to_products_list: Back To Products List
|
1063
|
-
back_to_promotion_categories_list: Back To Promotions Categories List
|
1064
|
-
back_to_promotions_list: Back To Promotions List
|
1065
1053
|
back_to_properties_list: Back To Property Types List
|
1066
1054
|
back_to_refund_reason_list: Back To Refund Reason List
|
1067
1055
|
back_to_reimbursement_type_list: Back To Reimbursement Type List
|
@@ -1087,13 +1075,14 @@ en:
|
|
1087
1075
|
backordered: Backordered
|
1088
1076
|
backorders_allowed: backorders allowed
|
1089
1077
|
balance_due: Balance Due
|
1090
|
-
base_amount: Base Amount
|
1091
1078
|
base_percent: Base Percent
|
1092
1079
|
bill_address: Bill Address
|
1093
1080
|
bill_address_required: Valid billing address required
|
1094
1081
|
billing: Billing
|
1095
1082
|
billing_address: Billing Address
|
1096
1083
|
both: Both
|
1084
|
+
brand: Brand
|
1085
|
+
brands: Brands
|
1097
1086
|
calculated_reimbursements: Calculated Reimbursements
|
1098
1087
|
calculator: Calculator
|
1099
1088
|
calculator_settings_warning: If you are changing the calculator type or preference source, you must save first before you can edit the calculator settings
|
@@ -1135,9 +1124,8 @@ en:
|
|
1135
1124
|
choose_a_taxon_to_sort_products_for: Choose a taxon to sort products for
|
1136
1125
|
choose_currency: Choose Currency
|
1137
1126
|
choose_dashboard_locale: Choose Dashboard Locale
|
1127
|
+
choose_dashboard_theme: Choose Dashboard Theme
|
1138
1128
|
choose_location: Choose Location
|
1139
|
-
choose_promotion_action: Choose Action
|
1140
|
-
choose_promotion_rule: Choose Rule
|
1141
1129
|
choose_reason: Choose Reason
|
1142
1130
|
city: City
|
1143
1131
|
clear_cache: Clear Cache
|
@@ -1150,6 +1138,11 @@ en:
|
|
1150
1138
|
company: Company
|
1151
1139
|
complete: complete
|
1152
1140
|
complete_order: Complete Order
|
1141
|
+
condition:
|
1142
|
+
damaged: Damaged
|
1143
|
+
new: New
|
1144
|
+
refurbished: Refurbished
|
1145
|
+
used: Used
|
1153
1146
|
configuration: Configuration
|
1154
1147
|
configurations: Configurations
|
1155
1148
|
confirm: Confirm
|
@@ -1435,7 +1428,6 @@ en:
|
|
1435
1428
|
create: Create
|
1436
1429
|
create_a_new_account: Create a new account
|
1437
1430
|
create_one: Create One.
|
1438
|
-
create_promotion_code: Create promotion code
|
1439
1431
|
create_reimbursement: Create reimbursement
|
1440
1432
|
created_at: Created At
|
1441
1433
|
created_by: Created by
|
@@ -1449,7 +1441,6 @@ en:
|
|
1449
1441
|
currency: Currency
|
1450
1442
|
currency_settings: Currency Settings
|
1451
1443
|
current: Current
|
1452
|
-
current_promotion_usage: 'Current Usage: %{count}'
|
1453
1444
|
customer: Customer
|
1454
1445
|
customer_details: Customer Details
|
1455
1446
|
customer_details_updated: Customer Details Updated
|
@@ -1488,10 +1479,8 @@ en:
|
|
1488
1479
|
destroy: Destroy
|
1489
1480
|
details: Details
|
1490
1481
|
discount_amount: Discount Amount
|
1491
|
-
discount_rules: Discount Rules
|
1492
1482
|
dismiss_banner: No. Thanks! I'm not interested, do not display this message again
|
1493
1483
|
display: Display
|
1494
|
-
download_promotion_codes_list: Download codes list
|
1495
1484
|
edit: Edit
|
1496
1485
|
edit_refund_reason: Edit Refund Reason
|
1497
1486
|
editing_adjustment_reason: Editing Adjustment Reason
|
@@ -1499,8 +1488,6 @@ en:
|
|
1499
1488
|
editing_option_type: Editing Option Type
|
1500
1489
|
editing_payment_method: Editing Payment Method
|
1501
1490
|
editing_product: Editing Product
|
1502
|
-
editing_promotion: Editing Promotion
|
1503
|
-
editing_promotion_category: Editing Promotion Category
|
1504
1491
|
editing_property: Editing Property Type
|
1505
1492
|
editing_refund: Editing Refund
|
1506
1493
|
editing_refund_reason: Editing Refund Reason
|
@@ -1532,6 +1519,9 @@ en:
|
|
1532
1519
|
no_user_or_email_specified: You need to login or provide your email before applying this coupon code.
|
1533
1520
|
no_user_specified: You need to login before applying this coupon code.
|
1534
1521
|
not_first_order: This coupon code can only be applied to your first order.
|
1522
|
+
quantity_less_than_minimum:
|
1523
|
+
one: You need to add a least 1 applicable item to your order.
|
1524
|
+
other: You need to add a least %{count} applicable items to your order.
|
1535
1525
|
email: Email
|
1536
1526
|
empty: Empty
|
1537
1527
|
empty_cart: Empty Cart
|
@@ -1601,7 +1591,6 @@ en:
|
|
1601
1591
|
general: General
|
1602
1592
|
google_analytics: Google Analytics
|
1603
1593
|
google_analytics_id: Analytics ID
|
1604
|
-
group_size: Group size
|
1605
1594
|
guest_checkout: Guest Checkout
|
1606
1595
|
guest_user_account: Checkout as a Guest
|
1607
1596
|
has_no_shipped_units: has no shipped units
|
@@ -1614,7 +1603,6 @@ en:
|
|
1614
1603
|
hide_out_of_stock: Hide out of stock
|
1615
1604
|
hints:
|
1616
1605
|
spree/calculator:
|
1617
|
-
promotions: This is used to determine the promotional discount to be applied to an order, an item, or shipping charges.
|
1618
1606
|
shipping_methods: This is used to calculate the shipping rates on a per order or per package rate.
|
1619
1607
|
tax_rates: The "Default Tax" calculator is used for both sales tax (United States-style taxes) and value-added tax (VAT). Typically this calculator should be the only tax calculator required by your store. "Flat Fee" can be used for any taxes that require a flat fee be charged to the customer.
|
1620
1608
|
spree/price:
|
@@ -1627,10 +1615,6 @@ en:
|
|
1627
1615
|
promotionable: 'This determines whether or not promotions can apply to this product.<br>Default: Checked'
|
1628
1616
|
shipping_category: 'This determines what kind of shipping this product requires.<br> Default: Default'
|
1629
1617
|
tax_category: 'This determines what kind of taxation is applied to this product.<br> Default: %{default_tax_category}'
|
1630
|
-
spree/promotion:
|
1631
|
-
expires_at: This determines when the promotion expires. <br> If no value is specified, the promotion will never expire.
|
1632
|
-
promo_code_will_be_disabled: Selecting this option, promo codes will be disabled for this promotion because all its rules / actions will be applied automatically to all orders.
|
1633
|
-
starts_at: This determines when the promotion can be applied to orders. <br> If no value is specified, the promotion will be immediately available.
|
1634
1618
|
spree/shipping_method:
|
1635
1619
|
available_to_all: Uncheck to select specific stock locations this shipping method will be available in.
|
1636
1620
|
spree/stock_location:
|
@@ -1693,8 +1677,6 @@ en:
|
|
1693
1677
|
intercept_email_instructions: Override email recipient and replace with this address.
|
1694
1678
|
invalid_exchange_variant: Invalid exchange variant.
|
1695
1679
|
invalid_payment_method_type: Invalid payment method type.
|
1696
|
-
invalid_promotion_action: Invalid promotion action.
|
1697
|
-
invalid_promotion_rule: Invalid promotion rule.
|
1698
1680
|
invalidate: Invalidate
|
1699
1681
|
inventory: Inventory
|
1700
1682
|
inventory_adjustment: Inventory Adjustment
|
@@ -1761,7 +1743,6 @@ en:
|
|
1761
1743
|
look_for_similar_items: Look for similar items
|
1762
1744
|
make_refund: Make refund
|
1763
1745
|
make_sure_the_above_reimbursement_amount_is_correct: Make sure the above reimbursement amount is correct
|
1764
|
-
manage_promotion_categories: Manage Promotion Categories
|
1765
1746
|
manage_stock: Store Stock
|
1766
1747
|
manage_variants: Manage Variants
|
1767
1748
|
manual_intervention_required: Manual intervention required
|
@@ -1790,6 +1771,9 @@ en:
|
|
1790
1771
|
name_contains: Name Contains
|
1791
1772
|
name_on_card: Name on card
|
1792
1773
|
name_or_sku: Name or SKU (enter at least first 4 characters of product name)
|
1774
|
+
navigation:
|
1775
|
+
switch_to_legacy: Show Legacy UI
|
1776
|
+
switch_to_solidus_admin: Show Legacy UI
|
1793
1777
|
negative_movement_absent_item: Cannot create negative movement for absent stock item.
|
1794
1778
|
new: New
|
1795
1779
|
new_adjustment: New Adjustment
|
@@ -1804,9 +1788,6 @@ en:
|
|
1804
1788
|
new_payment: New Payment
|
1805
1789
|
new_payment_method: New Payment Method
|
1806
1790
|
new_product: New Product
|
1807
|
-
new_promotion: New Promotion
|
1808
|
-
new_promotion_category: New Promotion Category
|
1809
|
-
new_promotion_code_batch: New Promotion Code Batch
|
1810
1791
|
new_property: New Property Type
|
1811
1792
|
new_refund: New Refund
|
1812
1793
|
new_refund_reason: New Refund Reason
|
@@ -1830,7 +1811,6 @@ en:
|
|
1830
1811
|
new_variant: New Variant
|
1831
1812
|
new_zone: New Zone
|
1832
1813
|
next: Next
|
1833
|
-
no_actions_added: No actions added
|
1834
1814
|
no_images_found: No images found
|
1835
1815
|
no_inventory_selected: No inventory selected
|
1836
1816
|
no_option_values_on_product_html: This product has no associated option values. Add some to it through Option Types in the %{link}.
|
@@ -1839,13 +1819,11 @@ en:
|
|
1839
1819
|
no_payment_methods_found: No payment methods found
|
1840
1820
|
no_pending_payments: No pending payments
|
1841
1821
|
no_products_found: No products found
|
1842
|
-
no_promotions_found: No promotions found
|
1843
1822
|
no_resource: No %{resource} found.
|
1844
1823
|
no_resource_found: No %{resource} found
|
1845
1824
|
no_resource_found_html: No %{resource} found, %{add_one_link}!
|
1846
1825
|
no_resource_found_link: Add One
|
1847
1826
|
no_results: No results
|
1848
|
-
no_rules_added: No rules added
|
1849
1827
|
no_shipping_method_selected: No shipping method selected.
|
1850
1828
|
no_shipping_methods_found: No shipping methods found
|
1851
1829
|
no_stock_locations_found: No stock locations found
|
@@ -1869,6 +1847,8 @@ en:
|
|
1869
1847
|
product_not_deleted: Product could not be deleted
|
1870
1848
|
variant_deleted: Variant has been deleted
|
1871
1849
|
variant_not_deleted: Variant could not be deleted
|
1850
|
+
null_promotion_handler:
|
1851
|
+
coupon_code_applied: Coupon code has been applied.
|
1872
1852
|
num_orders: "# Orders"
|
1873
1853
|
number: Number
|
1874
1854
|
number_of_codes: "%{count} codes"
|
@@ -1889,6 +1869,7 @@ en:
|
|
1889
1869
|
order_approved: Order approved
|
1890
1870
|
order_canceled: Order canceled
|
1891
1871
|
order_completed: Order completed
|
1872
|
+
order_count: Order Count
|
1892
1873
|
order_details: Order Details
|
1893
1874
|
order_email_resent: Order Email Resent
|
1894
1875
|
order_information: Order Information
|
@@ -2007,21 +1988,10 @@ en:
|
|
2007
1988
|
product_has_no_description: This product has no description
|
2008
1989
|
product_not_available_in_this_currency: This product is not available in the selected currency.
|
2009
1990
|
product_properties: Product Properties
|
2010
|
-
product_rule:
|
2011
|
-
choose_products: Choose products
|
2012
|
-
label: Order must contain %{select} of these products
|
2013
|
-
match_all: all
|
2014
|
-
match_any: at least one
|
2015
|
-
match_none: none
|
2016
|
-
product_source:
|
2017
|
-
group: From product group
|
2018
|
-
manual: Manually choose
|
2019
1991
|
product_without_default_price_cta: Please, create a Master Price!
|
2020
1992
|
product_without_default_price_info: This Product has no price in the default currency (%{default_currency}).
|
2021
1993
|
products: Products
|
2022
1994
|
promotion: Promotion
|
2023
|
-
promotion_action: Promotion Action
|
2024
|
-
promotion_actions: Actions
|
2025
1995
|
promotion_code_batch_mailer:
|
2026
1996
|
promotion_code_batch_errored:
|
2027
1997
|
message: 'Promotion code batch errored (%{error}) for promotion: '
|
@@ -2029,20 +1999,7 @@ en:
|
|
2029
1999
|
promotion_code_batch_finished:
|
2030
2000
|
message: 'All %{number_of_codes} codes have been created for promotion: '
|
2031
2001
|
subject: Promotion code batch finished
|
2032
|
-
promotion_code_batches:
|
2033
|
-
errored: 'Errored: %{error}'
|
2034
|
-
finished: All %{number_of_codes} codes have been created.
|
2035
|
-
processing: 'Processing: %{number_of_codes_processed} / %{number_of_codes}'
|
2036
|
-
promotion_form:
|
2037
|
-
match_policies:
|
2038
|
-
all: Match all of these rules
|
2039
|
-
any: Match any of these rules
|
2040
|
-
promotion_rule: Promotion Rule
|
2041
|
-
promotion_successfully_created: Promotion has been successfully created!
|
2042
2002
|
promotion_total_changed_before_complete: One or more of the promotions on your order have become ineligible and were removed. Please check the new order amounts and try again.
|
2043
|
-
promotion_uses: Promotion uses
|
2044
|
-
promotionable: Promotable
|
2045
|
-
promotions: Promotions
|
2046
2003
|
propagate_all_variants: Propagate all variants
|
2047
2004
|
properties: Property Types
|
2048
2005
|
property: Property Type
|
@@ -2143,7 +2100,6 @@ en:
|
|
2143
2100
|
rma_number: RMA Number
|
2144
2101
|
rma_value: RMA Value
|
2145
2102
|
roles: Roles
|
2146
|
-
rules: Rules
|
2147
2103
|
sales_total: Sales Total
|
2148
2104
|
sales_total_description: Sales Total For All Orders
|
2149
2105
|
sales_totals: Sales Totals
|
@@ -2154,6 +2110,7 @@ en:
|
|
2154
2110
|
scope: Scope
|
2155
2111
|
search: Search
|
2156
2112
|
search_results: Search results for '%{keywords}'
|
2113
|
+
search_results_all: Show all results for '%{keywords}'
|
2157
2114
|
searching: Searching
|
2158
2115
|
secure_connection_type: Secure Connection Type
|
2159
2116
|
security_settings: Security Settings
|
@@ -2292,8 +2249,6 @@ en:
|
|
2292
2249
|
user_has_no_store_credits: User does not have any available store credit
|
2293
2250
|
store_credit_category:
|
2294
2251
|
default: Default
|
2295
|
-
store_rule:
|
2296
|
-
choose_stores: Choose Stores
|
2297
2252
|
street_address: Street Address
|
2298
2253
|
street_address_2: Street Address (cont'd)
|
2299
2254
|
subtotal: Subtotal
|
@@ -2316,12 +2271,6 @@ en:
|
|
2316
2271
|
taxon_attachment_removal_error: There was an error removing the attachment
|
2317
2272
|
taxon_edit: Edit Taxon
|
2318
2273
|
taxon_placeholder: Add a Taxon
|
2319
|
-
taxon_rule:
|
2320
|
-
choose_taxons: Choose taxons
|
2321
|
-
label: Order must contain %{select} of these taxons
|
2322
|
-
match_all: all
|
2323
|
-
match_any: at least one
|
2324
|
-
match_none: none
|
2325
2274
|
taxonomies: Taxonomies
|
2326
2275
|
taxonomy: Taxonomy
|
2327
2276
|
taxonomy_edit: Edit taxonomy
|
@@ -2336,6 +2285,7 @@ en:
|
|
2336
2285
|
subject: Test Mail
|
2337
2286
|
test_mode: Test Mode
|
2338
2287
|
thank_you_for_your_order: Thank you for your business. Please print out a copy of this confirmation page for your records.
|
2288
|
+
theme_changed: Theme Changed
|
2339
2289
|
there_are_no_items_for_this_order: There are no items for this order. Please add an item to the order to continue.
|
2340
2290
|
there_were_problems_with_the_following_fields: There were problems with the following fields
|
2341
2291
|
this_order_has_already_received_a_refund: This order has already received a refund
|
@@ -2374,6 +2324,7 @@ en:
|
|
2374
2324
|
unfinalize_all_adjustments: Unfinalize All Adjustments
|
2375
2325
|
unlock: Unlock
|
2376
2326
|
unrecognized_card_type: Unrecognized Card Type
|
2327
|
+
unset: Unset
|
2377
2328
|
unshippable_items: Unshippable Items
|
2378
2329
|
update: Update
|
2379
2330
|
updated_successfully: Updated Successfully
|
@@ -2385,13 +2336,6 @@ en:
|
|
2385
2336
|
use_new_cc: Use a new card
|
2386
2337
|
use_new_cc_or_payment_method: Use a new card / payment method
|
2387
2338
|
user: User
|
2388
|
-
user_role_rule:
|
2389
|
-
choose_roles: Choose Roles
|
2390
|
-
label: User must contain %{select} of these roles
|
2391
|
-
match_all: all
|
2392
|
-
match_any: at least one
|
2393
|
-
user_rule:
|
2394
|
-
choose_users: Choose Users
|
2395
2339
|
users: Users
|
2396
2340
|
validation:
|
2397
2341
|
cannot_be_less_than_shipped_units: cannot be less than the number of shipped units.
|
@@ -2413,7 +2357,6 @@ en:
|
|
2413
2357
|
variants: Variants
|
2414
2358
|
version: Version
|
2415
2359
|
view_product: View Product On Store
|
2416
|
-
view_promotion_codes_list: View codes list
|
2417
2360
|
void: Void
|
2418
2361
|
weight: Weight
|
2419
2362
|
what_is_a_cvv: What is a (CVV) Credit Card Code?
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Spree::PermissionSets::Base.subclasses.each do |permission|
|
4
|
+
Spree::PermissionSet.create!(
|
5
|
+
name: permission.name.demodulize,
|
6
|
+
set: permission.name,
|
7
|
+
privilege: permission.privilege,
|
8
|
+
category: permission.category
|
9
|
+
)
|
10
|
+
end
|
@@ -3,7 +3,9 @@
|
|
3
3
|
Spree::ReturnReason.find_or_create_by(name: 'Better price available')
|
4
4
|
Spree::ReturnReason.find_or_create_by(name: 'Missed estimated delivery date')
|
5
5
|
Spree::ReturnReason.find_or_create_by(name: 'Missing parts or accessories')
|
6
|
-
Spree::ReturnReason.find_or_create_by(name: 'Damaged
|
6
|
+
Spree::ReturnReason.find_or_create_by(name: 'Damaged during transport')
|
7
|
+
Spree::ReturnReason.find_or_create_by(name: 'Defective within warranty period')
|
8
|
+
Spree::ReturnReason.find_or_create_by(name: 'Other defects or damages')
|
7
9
|
Spree::ReturnReason.find_or_create_by(name: 'Different from what was ordered')
|
8
10
|
Spree::ReturnReason.find_or_create_by(name: 'Different from description')
|
9
11
|
Spree::ReturnReason.find_or_create_by(name: 'No longer needed/wanted')
|
data/db/default/spree/states.rb
CHANGED