Module: KktShoppe
- Defined in:
- lib/kkt_shoppe.rb,
lib/kkt_shoppe/error.rb,
lib/kkt_shoppe/engine.rb,
lib/kkt_shoppe/version.rb,
lib/kkt_shoppe/settings.rb,
app/models/kkt_shoppe/user.rb,
app/models/kkt_shoppe/order.rb,
lib/kkt_shoppe/view_helpers.rb,
app/models/kkt_shoppe/address.rb,
app/models/kkt_shoppe/country.rb,
app/models/kkt_shoppe/payment.rb,
app/models/kkt_shoppe/product.rb,
app/models/kkt_shoppe/setting.rb,
lib/kkt_shoppe/orderable_item.rb,
app/models/kkt_shoppe/customer.rb,
app/models/kkt_shoppe/tax_rate.rb,
lib/kkt_shoppe/model_extension.rb,
lib/kkt_shoppe/settings_loader.rb,
lib/kkt_shoppe/setup_generator.rb,
lib/kkt_shoppe/country_importer.rb,
app/models/kkt_shoppe/attachment.rb,
app/models/kkt_shoppe/order_item.rb,
lib/kkt_shoppe/navigation_manager.rb,
app/mailers/kkt_shoppe/user_mailer.rb,
app/models/kkt_shoppe/order/states.rb,
app/mailers/kkt_shoppe/order_mailer.rb,
app/models/kkt_shoppe/order/actions.rb,
app/models/kkt_shoppe/order/billing.rb,
lib/kkt_shoppe/associated_countries.rb,
lib/kkt_shoppe/errors/refund_failed.rb,
app/models/kkt_shoppe/order/delivery.rb,
app/models/kkt_shoppe/delivery_service.rb,
app/models/kkt_shoppe/product/variants.rb,
app/models/kkt_shoppe/product_category.rb,
lib/kkt_shoppe/errors/not_enough_stock.rb,
lib/kkt_shoppe/errors/payment_declined.rb,
lib/kkt_shoppe/errors/unorderable_item.rb,
app/models/kkt_shoppe/product_attribute.rb,
app/helpers/kkt_shoppe/application_helper.rb,
app/controllers/kkt_shoppe/users_controller.rb,
lib/kkt_shoppe/errors/invalid_configuration.rb,
app/controllers/kkt_shoppe/orders_controller.rb,
app/models/kkt_shoppe/delivery_service_price.rb,
app/models/kkt_shoppe/product_categorization.rb,
app/models/kkt_shoppe/stock_level_adjustment.rb,
app/controllers/kkt_shoppe/payments_controller.rb,
app/controllers/kkt_shoppe/products_controller.rb,
app/controllers/kkt_shoppe/sessions_controller.rb,
app/controllers/kkt_shoppe/settings_controller.rb,
app/controllers/kkt_shoppe/variants_controller.rb,
app/helpers/kkt_shoppe/product_category_helper.rb,
app/controllers/kkt_shoppe/addresses_controller.rb,
app/controllers/kkt_shoppe/countries_controller.rb,
app/controllers/kkt_shoppe/customers_controller.rb,
app/controllers/kkt_shoppe/dashboard_controller.rb,
app/controllers/kkt_shoppe/tax_rates_controller.rb,
app/models/kkt_shoppe/product/product_attributes.rb,
app/controllers/kkt_shoppe/application_controller.rb,
app/controllers/kkt_shoppe/attachments_controller.rb,
lib/kkt_shoppe/errors/insufficient_stock_to_fulfil.rb,
lib/kkt_shoppe/errors/inappropriate_delivery_service.rb,
app/controllers/kkt_shoppe/delivery_services_controller.rb,
app/controllers/kkt_shoppe/product_categories_controller.rb,
app/controllers/kkt_shoppe/product_localisations_controller.rb,
app/controllers/kkt_shoppe/delivery_service_prices_controller.rb,
app/controllers/kkt_shoppe/stock_level_adjustments_controller.rb,
app/controllers/kkt_shoppe/product_category_localisations_controller.rb
Defined Under Namespace
Modules: ApplicationHelper, AssociatedCountries, CountryImporter, Errors, ModelExtension, OrderableItem, ProductCategoryHelper, ViewHelpers Classes: Address, AddressesController, ApplicationController, Attachment, AttachmentUploader, AttachmentsController, CountriesController, Country, Customer, CustomersController, DashboardController, DeliveryService, DeliveryServicePrice, DeliveryServicePricesController, DeliveryServicesController, Engine, Error, NavigationManager, Order, OrderItem, OrderMailer, OrdersController, Payment, PaymentsController, Product, ProductAttribute, ProductCategoriesController, ProductCategorization, ProductCategory, ProductCategoryLocalisationsController, ProductLocalisationsController, ProductsController, SessionsController, Setting, Settings, SettingsController, SettingsLoader, SetupGenerator, StockLevelAdjustment, StockLevelAdjustmentsController, TaxRate, TaxRatesController, User, UserMailer, UsersController, VariantsController
Constant Summary collapse
- VERSION =
"2.0.2"
Class Method Summary collapse
-
.add_settings_group(group, fields = []) ⇒ Object
Defines a new set of settings which should be configrable from the settings page in the KktShoppe UI.
-
.reset_settings ⇒ NilClass
Clears the settings from the thread cache so they will be taken from the database on next access.
-
.root ⇒ String
The path to the root of the KktShoppe applicatinio.
-
.settings ⇒ KktShoppe::Settings
KktShoppe settings as configured in the database.
-
.settings_groups ⇒ Hash
All settings groups which are available for configuration on the settings page.
Class Method Details
.add_settings_group(group, fields = []) ⇒ Object
Defines a new set of settings which should be configrable from the settings page in the KktShoppe UI.
43 44 45 46 |
# File 'lib/kkt_shoppe.rb', line 43 def add_settings_group(group, fields = []) settings_groups[group] ||= [] settings_groups[group] = settings_groups[group] | fields end |
.reset_settings ⇒ NilClass
Clears the settings from the thread cache so they will be taken from the database on next access
37 38 39 |
# File 'lib/kkt_shoppe.rb', line 37 def reset_settings Thread.current[:kkt_shoppe_settings] = nil end |
.root ⇒ String
The path to the root of the KktShoppe applicatinio
22 23 24 |
# File 'lib/kkt_shoppe.rb', line 22 def root File.('../../', __FILE__) end |
.settings ⇒ KktShoppe::Settings
KktShoppe settings as configured in the database
29 30 31 |
# File 'lib/kkt_shoppe.rb', line 29 def settings Thread.current[:kkt_shoppe_settings] ||= KktShoppe::Settings.new(KktShoppe::Setting.to_hash) end |
.settings_groups ⇒ Hash
All settings groups which are available for configuration on the settings page.
51 52 53 |
# File 'lib/kkt_shoppe.rb', line 51 def settings_groups @settings_groups ||= {} end |