workarea 3.4.12
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/.rubocop.yml +326 -0
- data/CHANGELOG.md +20501 -0
- data/README.md +163 -0
- data/docker-compose.yml +27 -0
- data/docs/Gemfile +8 -0
- data/docs/bin/middleman +29 -0
- data/docs/config.rb +87 -0
- data/docs/config.ru +7 -0
- data/docs/data/articles.yml +157 -0
- data/docs/package.json +15 -0
- data/docs/source/404.html.erb +13 -0
- data/docs/source/articles/access-routes-in-javascript.html.md +33 -0
- data/docs/source/articles/add-a-content-area.html.md +169 -0
- data/docs/source/articles/add-a-content-block-type.html.md +334 -0
- data/docs/source/articles/add-a-report.html.md +202 -0
- data/docs/source/articles/add-css-through-the-admin-ui.html.md +30 -0
- data/docs/source/articles/add-javascript-through-a-manifest.html.md +367 -0
- data/docs/source/articles/add-javascript-through-a-view.html.md +80 -0
- data/docs/source/articles/add-javascript-through-the-admin-ui.html.md +30 -0
- data/docs/source/articles/add-metrics.html.md +58 -0
- data/docs/source/articles/add-or-replace-a-pricing-calculator.html.md +150 -0
- data/docs/source/articles/add-remove-or-change-a-mongoid-validation.html.md +147 -0
- data/docs/source/articles/add-remove-or-change-a-product-template.html.md +142 -0
- data/docs/source/articles/add-remove-sort-and-group-storefront-search-filters.html.md +483 -0
- data/docs/source/articles/add-stylesheets-through-a-manifest.html.md +276 -0
- data/docs/source/articles/add-system-content.html.md +138 -0
- data/docs/source/articles/analytics-overview.html.md +51 -0
- data/docs/source/articles/analyze-storefront-search-results.html.md +261 -0
- data/docs/source/articles/api-overview.html.md +35 -0
- data/docs/source/articles/appending.html.md +506 -0
- data/docs/source/articles/application-document.html.md +88 -0
- data/docs/source/articles/automated-javascript-testing.html.md +162 -0
- data/docs/source/articles/b2b-overview.html.md +64 -0
- data/docs/source/articles/browser-and-device-support.html.md +47 -0
- data/docs/source/articles/change-product-placeholder-image.html.md +39 -0
- data/docs/source/articles/change-storefront-search-results.html.md +283 -0
- data/docs/source/articles/change-the-storefront-product-pricing-ui.html.md +348 -0
- data/docs/source/articles/change-the-storefront-search-filters-ui.html.md +103 -0
- data/docs/source/articles/checkout.html.md +479 -0
- data/docs/source/articles/commerce-model.html.md +164 -0
- data/docs/source/articles/configuration-for-hosting.html.md +106 -0
- data/docs/source/articles/configuration.html.md +406 -0
- data/docs/source/articles/configure-a-payment-gateway.html.md +58 -0
- data/docs/source/articles/configure-asset-storage.html.md +29 -0
- data/docs/source/articles/configure-asset-types.html.md +18 -0
- data/docs/source/articles/configure-contact-form-subjects-list.html.md +24 -0
- data/docs/source/articles/configure-imageoptim.html.md +23 -0
- data/docs/source/articles/configure-locales.html.md +45 -0
- data/docs/source/articles/configure-logins-and-authentication.html.md +42 -0
- data/docs/source/articles/configure-low-inventory-threshold.html.md +26 -0
- data/docs/source/articles/configure-product-image-sizes-and-processing.html.md +28 -0
- data/docs/source/articles/content.html.md +554 -0
- data/docs/source/articles/contentable.html.md +41 -0
- data/docs/source/articles/contribute-code.html.md +69 -0
- data/docs/source/articles/contribute-documentation.html.md +60 -0
- data/docs/source/articles/create-a-custom-discount.html.md +234 -0
- data/docs/source/articles/create-a-new-app.html.md +131 -0
- data/docs/source/articles/create-a-plugin.html.md +19 -0
- data/docs/source/articles/create-a-style-guide.html.md +71 -0
- data/docs/source/articles/create-a-theme.html.md +134 -0
- data/docs/source/articles/css-architectural-overview.html.md +89 -0
- data/docs/source/articles/customize-a-helper.html.md +91 -0
- data/docs/source/articles/decoration.html.md +415 -0
- data/docs/source/articles/define-and-configure-inventory-policies.html.md +107 -0
- data/docs/source/articles/documentation-style-guide.html.md +48 -0
- data/docs/source/articles/documentation.html.md +54 -0
- data/docs/source/articles/domain-modeling.html.md +82 -0
- data/docs/source/articles/error-pages.html.md.erb +95 -0
- data/docs/source/articles/extension-overview.html.md +152 -0
- data/docs/source/articles/favicon-support.html.md +112 -0
- data/docs/source/articles/feature-spec-helper-stylesheet.html.md +25 -0
- data/docs/source/articles/featurejs-and-feature-spec-helper.html.md +20 -0
- data/docs/source/articles/help-and-support.html.md +34 -0
- data/docs/source/articles/html-fragment-caching.html.md +46 -0
- data/docs/source/articles/http-caching.html.md +43 -0
- data/docs/source/articles/i18n.html.md +35 -0
- data/docs/source/articles/images-flow.html.md +10 -0
- data/docs/source/articles/index-storefront-search-documents.html.md +104 -0
- data/docs/source/articles/infrastructure.html.md +46 -0
- data/docs/source/articles/installing.html.md +61 -0
- data/docs/source/articles/integrate-a-payment-gateway.html.md +124 -0
- data/docs/source/articles/integrate-a-web-analytics-provider.html.md +35 -0
- data/docs/source/articles/integrate-an-inventory-management-system.html.md +88 -0
- data/docs/source/articles/integrating-with-other-software.html.md +59 -0
- data/docs/source/articles/inventory.html.md +352 -0
- data/docs/source/articles/javascript-coding-standards.html.md +30 -0
- data/docs/source/articles/javascript-modules.html.md +174 -0
- data/docs/source/articles/javascript-overview.html.md +62 -0
- data/docs/source/articles/javascript-reference-documentation.html.md +51 -0
- data/docs/source/articles/javascript-templates.html.md +52 -0
- data/docs/source/articles/low-level-caching.html.md +25 -0
- data/docs/source/articles/maintain-a-plugin.html.md +12 -0
- data/docs/source/articles/maintenance-policy.html.md +79 -0
- data/docs/source/articles/navigable.html.md +51 -0
- data/docs/source/articles/navigating-the-code.html.md +149 -0
- data/docs/source/articles/navigation.html.md +386 -0
- data/docs/source/articles/order-life-cycle.html.md +546 -0
- data/docs/source/articles/order-pricing.html.md +389 -0
- data/docs/source/articles/orders-and-items.html.md +210 -0
- data/docs/source/articles/orders.html.md +66 -0
- data/docs/source/articles/overriding.html.md +155 -0
- data/docs/source/articles/overview.html.md +43 -0
- data/docs/source/articles/plugins-overview.html.md +12 -0
- data/docs/source/articles/prerequisites-and-dependencies.html.md +202 -0
- data/docs/source/articles/products.html.md.erb +1270 -0
- data/docs/source/articles/progressive-web-application-support.html.md +148 -0
- data/docs/source/articles/rails-asset-manifests.html.md +33 -0
- data/docs/source/articles/rails-asset-view-helpers.html.md +25 -0
- data/docs/source/articles/reading-data.html.md +10 -0
- data/docs/source/articles/releasable.html.md +37 -0
- data/docs/source/articles/report-a-bug.html.md +75 -0
- data/docs/source/articles/ruby-coding-standards.html.md +10 -0
- data/docs/source/articles/run-sidekiq-in-a-local-environment.html.md +40 -0
- data/docs/source/articles/searching.html.md +1005 -0
- data/docs/source/articles/security-policy.html.md +42 -0
- data/docs/source/articles/seeds.html.md +345 -0
- data/docs/source/articles/shipping.html.md +756 -0
- data/docs/source/articles/sort-and-exclude-product-options.html.md +47 -0
- data/docs/source/articles/storefront-search-features.html.md +568 -0
- data/docs/source/articles/storefront-searches.html.md +126 -0
- data/docs/source/articles/style-guides.html.md +21 -0
- data/docs/source/articles/stylesheet-coding-standards.html.md +24 -0
- data/docs/source/articles/stylesheets-overview.html.md +67 -0
- data/docs/source/articles/swappable-list-data-structure.html.md +81 -0
- data/docs/source/articles/system-emails.html.md +102 -0
- data/docs/source/articles/taggable.html.md +8 -0
- data/docs/source/articles/test-a-credit-card-transaction.html.md +16 -0
- data/docs/source/articles/test-if-a-plugin-is-installed.html.md +34 -0
- data/docs/source/articles/testing.html.md +914 -0
- data/docs/source/articles/themes-overview.html.md +155 -0
- data/docs/source/articles/translate-administrable-content.html.md +14 -0
- data/docs/source/articles/translate-javascript-content.html.md +16 -0
- data/docs/source/articles/translate-or-customize-message-content.html.md +29 -0
- data/docs/source/articles/translate-or-customize-static-content.html.md +30 -0
- data/docs/source/articles/use-an-existing-workarea-app.html.md +108 -0
- data/docs/source/articles/view-models.html.md +509 -0
- data/docs/source/articles/views.html.md +14 -0
- data/docs/source/articles/workers.html.md +613 -0
- data/docs/source/articles/writing-data.html.md +10 -0
- data/docs/source/cli.html.md +163 -0
- data/docs/source/favicon.ico +0 -0
- data/docs/source/images/3-variants-1-option.png +0 -0
- data/docs/source/images/3-variants-3-options.png +0 -0
- data/docs/source/images/3-years-primary-image.png +0 -0
- data/docs/source/images/404-storefront-error-page.png +0 -0
- data/docs/source/images/404-system-content-admin.png +0 -0
- data/docs/source/images/404.jpg +0 -0
- data/docs/source/images/5-years-primary-image.png +0 -0
- data/docs/source/images/activity-dashboard.png +0 -0
- data/docs/source/images/activity-for-object.png +0 -0
- data/docs/source/images/activity-ui.png +0 -0
- data/docs/source/images/adding-captioned-image-block-custom-icon.png +0 -0
- data/docs/source/images/adding-captioned-image-block-default-icon.png +0 -0
- data/docs/source/images/admin-alerts-ui.png +0 -0
- data/docs/source/images/admin-category-range-filters.png +0 -0
- data/docs/source/images/admin-for-3-column-hero.png +0 -0
- data/docs/source/images/admin-help-index.png +0 -0
- data/docs/source/images/admin-help-ui.png +0 -0
- data/docs/source/images/admin-javascript.png +0 -0
- data/docs/source/images/admin-notification-for-deactivated-discount.png +0 -0
- data/docs/source/images/admin-notifications-ui.png +0 -0
- data/docs/source/images/admin-product-show-page.png +0 -0
- data/docs/source/images/admin-products-index-page.png +0 -0
- data/docs/source/images/admin-range-filters.png +0 -0
- data/docs/source/images/admin-style-guides-navigation.png +0 -0
- data/docs/source/images/after-re-seeding.png +0 -0
- data/docs/source/images/after-seeding-localhost-3000.png +0 -0
- data/docs/source/images/after-seeding.png +0 -0
- data/docs/source/images/arrow.svg +1 -0
- data/docs/source/images/arrow_white.svg +1 -0
- data/docs/source/images/aws-resource-map.png +0 -0
- data/docs/source/images/backordered-until-output-on-inventory-sku-card.png +0 -0
- data/docs/source/images/before-seeding-localhost-3000.png +0 -0
- data/docs/source/images/before-seeding.png +0 -0
- data/docs/source/images/browsing-workarea-versions-on-the-web.png +0 -0
- data/docs/source/images/bulk-asset-upload-on-assets-index-page.png +0 -0
- data/docs/source/images/bulk-asset-upload-while-editing-content.png +0 -0
- data/docs/source/images/bundle-show-workarea-core.png +0 -0
- data/docs/source/images/bundle-show-workarea.png +0 -0
- data/docs/source/images/calendar-for-backordered-until-field.png +0 -0
- data/docs/source/images/captioned-image-block-in-storefront.png +0 -0
- data/docs/source/images/captioned-image-content-block-storefront-component-style-guide.png +0 -0
- data/docs/source/images/cart-system-content-in-admin.png +0 -0
- data/docs/source/images/cart-system-content-in-storefront.png +0 -0
- data/docs/source/images/checkout-addresses-guest.png +0 -0
- data/docs/source/images/checkout-addresses-user.png +0 -0
- data/docs/source/images/checkout-confirmation.png +0 -0
- data/docs/source/images/checkout-flow-0.png +0 -0
- data/docs/source/images/checkout-flow-1.png +0 -0
- data/docs/source/images/checkout-flow-2.png +0 -0
- data/docs/source/images/checkout-flow-3.png +0 -0
- data/docs/source/images/checkout-flow-4.png +0 -0
- data/docs/source/images/checkout-payment-guest.png +0 -0
- data/docs/source/images/checkout-payment-user.png +0 -0
- data/docs/source/images/checkout-shipping.png +0 -0
- data/docs/source/images/color-picker-component-admin-style-guide.png +0 -0
- data/docs/source/images/color-picker-component-on-content-editing-screen.png +0 -0
- data/docs/source/images/commerce-model-carts-orders.png +0 -0
- data/docs/source/images/commerce-model-order-pricing.png +0 -0
- data/docs/source/images/commerce-model.png +0 -0
- data/docs/source/images/configuring-an-index-pattern-in-kibana.png +0 -0
- data/docs/source/images/content-block-presets.png +0 -0
- data/docs/source/images/content-search-customization.png +0 -0
- data/docs/source/images/country-with-region-data-in-address-form.png +0 -0
- data/docs/source/images/country-without-region-data-in-address-form.png +0 -0
- data/docs/source/images/create-content-block-preset-ui.png +0 -0
- data/docs/source/images/credit-card-icons.png +0 -0
- data/docs/source/images/css-added-through-admin.png +0 -0
- data/docs/source/images/css-admin-ui.png +0 -0
- data/docs/source/images/current-configuration-shown-in-admin-settings.png +0 -0
- data/docs/source/images/customer-impersonation-in-admin.png +0 -0
- data/docs/source/images/customer-impersonation-in-store-front.png +0 -0
- data/docs/source/images/date-filter-same-day.png +0 -0
- data/docs/source/images/developer-toolbar-in-store-front.png +0 -0
- data/docs/source/images/discounts-sorted-by-most-redeemed.png +0 -0
- data/docs/source/images/edit-help-article.png +0 -0
- data/docs/source/images/editing-content-for-search-customization.png +0 -0
- data/docs/source/images/editing-dynamic-captioned-image-block.png +0 -0
- data/docs/source/images/editing-product-fields-in-the-admin.png +0 -0
- data/docs/source/images/editing-search-system-content.png +0 -0
- data/docs/source/images/editing-static-captioned-image-block-custom-icon.png +0 -0
- data/docs/source/images/editing-static-captioned-image-block-default-icon.png +0 -0
- data/docs/source/images/external.svg +1 -0
- data/docs/source/images/favicon_16.png +0 -0
- data/docs/source/images/favicon_180.png +0 -0
- data/docs/source/images/favicon_32.png +0 -0
- data/docs/source/images/filters-all.png +0 -0
- data/docs/source/images/filters-control.png +0 -0
- data/docs/source/images/filters-custom.png +0 -0
- data/docs/source/images/filters-groups.png +0 -0
- data/docs/source/images/filters-material.png +0 -0
- data/docs/source/images/filters-omitted.png +0 -0
- data/docs/source/images/filters-pinned.png +0 -0
- data/docs/source/images/filters-range.png +0 -0
- data/docs/source/images/filters-sorted.png +0 -0
- data/docs/source/images/filters-wrapping-to-second-line-in-admin.png +0 -0
- data/docs/source/images/generic-product-template-images-no-options-selected.png +0 -0
- data/docs/source/images/generic-product-template-images-options-selected.png +0 -0
- data/docs/source/images/generic-template.png +0 -0
- data/docs/source/images/hosting.svg +1 -0
- data/docs/source/images/image-group-content-block-in-storefront.png +0 -0
- data/docs/source/images/images.svg +1 -0
- data/docs/source/images/import-export-screenshot.png +0 -0
- data/docs/source/images/invalid-display.png +0 -0
- data/docs/source/images/itcss.png +0 -0
- data/docs/source/images/kibana-dev-tools-console.png +0 -0
- data/docs/source/images/layout-content-admin-with-2-areas.png +0 -0
- data/docs/source/images/layout-content-admin-with-3-areas.png +0 -0
- data/docs/source/images/link-to-search-system-content.png +0 -0
- data/docs/source/images/logo.svg +1 -0
- data/docs/source/images/menu.svg +2 -0
- data/docs/source/images/mongo-replica-set.svg +1 -0
- data/docs/source/images/multi-column-hero-blocks.png +0 -0
- data/docs/source/images/option-selects-product-template-images-options-selected.png +0 -0
- data/docs/source/images/option-selects-template.png +0 -0
- data/docs/source/images/option-thumbnails-template.png +0 -0
- data/docs/source/images/order-item-total-price-diagram.png +0 -0
- data/docs/source/images/order-pricing-cart-example.png +0 -0
- data/docs/source/images/order-pricing-example-adjustments.png +0 -0
- data/docs/source/images/order-pricing-example-totals.png +0 -0
- data/docs/source/images/order-pricing-placed-order-example.png +0 -0
- data/docs/source/images/order-shipping-total-diagram.png +0 -0
- data/docs/source/images/order-show-with-multiple-tenders.png +0 -0
- data/docs/source/images/order-subtotal-price-diagram.png +0 -0
- data/docs/source/images/order-tax-total-diagram.png +0 -0
- data/docs/source/images/order-total-price-diagram.png +0 -0
- data/docs/source/images/order-total-value-diagram.png +0 -0
- data/docs/source/images/orders-dashboard-links.png +0 -0
- data/docs/source/images/oval.svg +1 -0
- data/docs/source/images/payment-icon-storefront-style-guide.png +0 -0
- data/docs/source/images/people-dashboard-links.png +0 -0
- data/docs/source/images/price-adjustments-diagram.png +0 -0
- data/docs/source/images/price-display-no-options.png +0 -0
- data/docs/source/images/price-display-options-selected.png +0 -0
- data/docs/source/images/pricing-calculators-diagram.png +0 -0
- data/docs/source/images/product-list-content-block-admin.png +0 -0
- data/docs/source/images/product-list-content-block-in-store-front.png +0 -0
- data/docs/source/images/promo-products-excluded-autocomplete-results-after.png +0 -0
- data/docs/source/images/promo-products-excluded-featured-category-results-after.png +0 -0
- data/docs/source/images/promo-products-excluded-recommendations-results-after.png +0 -0
- data/docs/source/images/promo-products-excluded-search-category-results-after.png +0 -0
- data/docs/source/images/promo-products-excluded-search-results-after.png +0 -0
- data/docs/source/images/promo-products-included-autocomplete-results-before.png +0 -0
- data/docs/source/images/promo-products-included-featured-category-results-before.png +0 -0
- data/docs/source/images/promo-products-included-recommendations-results-before.png +0 -0
- data/docs/source/images/promo-products-included-search-category-results-before.png +0 -0
- data/docs/source/images/promo-products-included-search-results-before.png +0 -0
- data/docs/source/images/rails-version-constraint.png +0 -0
- data/docs/source/images/re-enable-discount.png +0 -0
- data/docs/source/images/reading-data.svg +1 -0
- data/docs/source/images/readme-hero.png +0 -0
- data/docs/source/images/redesigned-customized-sort-for-search-results.png +0 -0
- data/docs/source/images/reviews-summary-above-share-buttons.png +0 -0
- data/docs/source/images/reviews-summary-below-product-name.png +0 -0
- data/docs/source/images/reviews-summary-below-share-buttons.png +0 -0
- data/docs/source/images/reviews-summary-removed.png +0 -0
- data/docs/source/images/rsa-fingerprint-for-stash.png +0 -0
- data/docs/source/images/ruby-version-constraint.png +0 -0
- data/docs/source/images/script-tag-added-through-admin.png +0 -0
- data/docs/source/images/search-analysis-admin-alternate-rendering.png +0 -0
- data/docs/source/images/search-analysis-admin.png +0 -0
- data/docs/source/images/search-quality-report.png +0 -0
- data/docs/source/images/search.svg +1 -0
- data/docs/source/images/searching-for-cart-system-content-in-admin.png +0 -0
- data/docs/source/images/searching-for-layout-system-content-in-admin.png +0 -0
- data/docs/source/images/seeded-admin.png +0 -0
- data/docs/source/images/seeds-from-plugins.png +0 -0
- data/docs/source/images/seo-metadata-automation-ui.png +0 -0
- data/docs/source/images/show-password-button.png +0 -0
- data/docs/source/images/storefront-autocomplete.png +0 -0
- data/docs/source/images/storefront-category-summary-content-block.png +0 -0
- data/docs/source/images/storefront-category.png +0 -0
- data/docs/source/images/storefront-product-after-overriding.png +0 -0
- data/docs/source/images/storefront-product-before-overriding.png +0 -0
- data/docs/source/images/storefront-product-browse-page.png +0 -0
- data/docs/source/images/storefront-product-recommendations.png +0 -0
- data/docs/source/images/storefront-product-show-page.png +0 -0
- data/docs/source/images/storefront-requests-and-search-requests.png +0 -0
- data/docs/source/images/storefront-search-request-handling.png +0 -0
- data/docs/source/images/storefront-search-response-creation.png +0 -0
- data/docs/source/images/storefront-search.png +0 -0
- data/docs/source/images/storefront-style-guides-navigation.png +0 -0
- data/docs/source/images/styles.css +3 -0
- data/docs/source/images/tax-categories-ui.png +0 -0
- data/docs/source/images/tax-rates-ui.png +0 -0
- data/docs/source/images/unpurchasable-product.png +0 -0
- data/docs/source/images/url-redirects-filtering.png +0 -0
- data/docs/source/images/utility-nav-area-in-admin.png +0 -0
- data/docs/source/images/utility-nav-area-in-storefront.png +0 -0
- data/docs/source/images/validation-message-in-storefront.png +0 -0
- data/docs/source/images/view-model-interface.png +0 -0
- data/docs/source/images/viewing-workarea-version-in-source.png +0 -0
- data/docs/source/images/workarea.svg +1 -0
- data/docs/source/images/worst-performing-searches-on-results-customization-page.png +0 -0
- data/docs/source/images/writing-data.svg +1 -0
- data/docs/source/index.html.erb +167 -0
- data/docs/source/javascripts/jquery.js +2 -0
- data/docs/source/javascripts/lunr.js +7 -0
- data/docs/source/javascripts/site.js +299 -0
- data/docs/source/javascripts/vendor/highlight.pack.js +2 -0
- data/docs/source/layouts/article.erb +106 -0
- data/docs/source/layouts/bare.erb +46 -0
- data/docs/source/layouts/layout.erb +43 -0
- data/docs/source/release-notes.html.md +258 -0
- data/docs/source/release-notes/workarea-3-0-0.html.md +146 -0
- data/docs/source/release-notes/workarea-3-0-1.html.md +161 -0
- data/docs/source/release-notes/workarea-3-0-10.html.md +39 -0
- data/docs/source/release-notes/workarea-3-0-11.html.md +277 -0
- data/docs/source/release-notes/workarea-3-0-12.html.md +14 -0
- data/docs/source/release-notes/workarea-3-0-13.html.md +153 -0
- data/docs/source/release-notes/workarea-3-0-14.html.md +93 -0
- data/docs/source/release-notes/workarea-3-0-15.html.md +107 -0
- data/docs/source/release-notes/workarea-3-0-16.html.md +36 -0
- data/docs/source/release-notes/workarea-3-0-17.html.md +141 -0
- data/docs/source/release-notes/workarea-3-0-18.html.md +123 -0
- data/docs/source/release-notes/workarea-3-0-19.html.md +160 -0
- data/docs/source/release-notes/workarea-3-0-2.html.md +222 -0
- data/docs/source/release-notes/workarea-3-0-20.html.md +95 -0
- data/docs/source/release-notes/workarea-3-0-21.html.md +168 -0
- data/docs/source/release-notes/workarea-3-0-22.html.md +268 -0
- data/docs/source/release-notes/workarea-3-0-23.html.md +173 -0
- data/docs/source/release-notes/workarea-3-0-24.html.md +19 -0
- data/docs/source/release-notes/workarea-3-0-25.html.md +26 -0
- data/docs/source/release-notes/workarea-3-0-26.html.md +199 -0
- data/docs/source/release-notes/workarea-3-0-27.html.md +113 -0
- data/docs/source/release-notes/workarea-3-0-28.html.md +39 -0
- data/docs/source/release-notes/workarea-3-0-29.html.md +73 -0
- data/docs/source/release-notes/workarea-3-0-3.html.md +35 -0
- data/docs/source/release-notes/workarea-3-0-30.html.md +186 -0
- data/docs/source/release-notes/workarea-3-0-31.html.md +125 -0
- data/docs/source/release-notes/workarea-3-0-32.html.md +73 -0
- data/docs/source/release-notes/workarea-3-0-33.html.md +137 -0
- data/docs/source/release-notes/workarea-3-0-34.html.md +203 -0
- data/docs/source/release-notes/workarea-3-0-35.html.md +205 -0
- data/docs/source/release-notes/workarea-3-0-36.html.md +105 -0
- data/docs/source/release-notes/workarea-3-0-37.html.md +144 -0
- data/docs/source/release-notes/workarea-3-0-38.html.md +73 -0
- data/docs/source/release-notes/workarea-3-0-39.html.md +77 -0
- data/docs/source/release-notes/workarea-3-0-4.html.md +14 -0
- data/docs/source/release-notes/workarea-3-0-40.html.md +130 -0
- data/docs/source/release-notes/workarea-3-0-41.html.md +70 -0
- data/docs/source/release-notes/workarea-3-0-42.html.md +52 -0
- data/docs/source/release-notes/workarea-3-0-43.html.md +72 -0
- data/docs/source/release-notes/workarea-3-0-44.html.md +93 -0
- data/docs/source/release-notes/workarea-3-0-45.html.md +61 -0
- data/docs/source/release-notes/workarea-3-0-46.html.md +171 -0
- data/docs/source/release-notes/workarea-3-0-47.html.md +130 -0
- data/docs/source/release-notes/workarea-3-0-48.html.md +160 -0
- data/docs/source/release-notes/workarea-3-0-49.html.md +28 -0
- data/docs/source/release-notes/workarea-3-0-5.html.md +225 -0
- data/docs/source/release-notes/workarea-3-0-50.html.md +74 -0
- data/docs/source/release-notes/workarea-3-0-51.html.md +61 -0
- data/docs/source/release-notes/workarea-3-0-52.html.md +76 -0
- data/docs/source/release-notes/workarea-3-0-53.html.md +126 -0
- data/docs/source/release-notes/workarea-3-0-54.html.md +112 -0
- data/docs/source/release-notes/workarea-3-0-55.html.md +105 -0
- data/docs/source/release-notes/workarea-3-0-56.html.md +56 -0
- data/docs/source/release-notes/workarea-3-0-57.html.md +82 -0
- data/docs/source/release-notes/workarea-3-0-58.html.md +153 -0
- data/docs/source/release-notes/workarea-3-0-59.html.md +78 -0
- data/docs/source/release-notes/workarea-3-0-6.html.md +165 -0
- data/docs/source/release-notes/workarea-3-0-60.html.md +43 -0
- data/docs/source/release-notes/workarea-3-0-61.html.md +46 -0
- data/docs/source/release-notes/workarea-3-0-62.html.md +23 -0
- data/docs/source/release-notes/workarea-3-0-63.html.md +25 -0
- data/docs/source/release-notes/workarea-3-0-64.html.md +25 -0
- data/docs/source/release-notes/workarea-3-0-65.html.md +37 -0
- data/docs/source/release-notes/workarea-3-0-7.html.md +207 -0
- data/docs/source/release-notes/workarea-3-0-8.html.md +337 -0
- data/docs/source/release-notes/workarea-3-0-9.html.md +196 -0
- data/docs/source/release-notes/workarea-3-1-0.html.md +414 -0
- data/docs/source/release-notes/workarea-3-1-1.html.md +139 -0
- data/docs/source/release-notes/workarea-3-1-10.html.md +19 -0
- data/docs/source/release-notes/workarea-3-1-11.html.md +27 -0
- data/docs/source/release-notes/workarea-3-1-12.html.md +216 -0
- data/docs/source/release-notes/workarea-3-1-13.html.md +113 -0
- data/docs/source/release-notes/workarea-3-1-14.html.md +39 -0
- data/docs/source/release-notes/workarea-3-1-15.html.md +107 -0
- data/docs/source/release-notes/workarea-3-1-16.html.md +188 -0
- data/docs/source/release-notes/workarea-3-1-17.html.md +141 -0
- data/docs/source/release-notes/workarea-3-1-18.html.md +73 -0
- data/docs/source/release-notes/workarea-3-1-19.html.md +137 -0
- data/docs/source/release-notes/workarea-3-1-2.html.md +55 -0
- data/docs/source/release-notes/workarea-3-1-20.html.md +203 -0
- data/docs/source/release-notes/workarea-3-1-21.html.md +205 -0
- data/docs/source/release-notes/workarea-3-1-22.html.md +121 -0
- data/docs/source/release-notes/workarea-3-1-23.html.md +144 -0
- data/docs/source/release-notes/workarea-3-1-24.html.md +94 -0
- data/docs/source/release-notes/workarea-3-1-25.html.md +77 -0
- data/docs/source/release-notes/workarea-3-1-26.html.md +130 -0
- data/docs/source/release-notes/workarea-3-1-27.html.md +70 -0
- data/docs/source/release-notes/workarea-3-1-28.html.md +52 -0
- data/docs/source/release-notes/workarea-3-1-29.html.md +44 -0
- data/docs/source/release-notes/workarea-3-1-3.html.md +185 -0
- data/docs/source/release-notes/workarea-3-1-30.html.md +72 -0
- data/docs/source/release-notes/workarea-3-1-31.html.md +93 -0
- data/docs/source/release-notes/workarea-3-1-32.html.md +61 -0
- data/docs/source/release-notes/workarea-3-1-33.html.md +171 -0
- data/docs/source/release-notes/workarea-3-1-34.html.md +130 -0
- data/docs/source/release-notes/workarea-3-1-35.html.md +179 -0
- data/docs/source/release-notes/workarea-3-1-36.html.md +28 -0
- data/docs/source/release-notes/workarea-3-1-37.html.md +74 -0
- data/docs/source/release-notes/workarea-3-1-38.html.md +61 -0
- data/docs/source/release-notes/workarea-3-1-39.html.md +96 -0
- data/docs/source/release-notes/workarea-3-1-4.html.md +148 -0
- data/docs/source/release-notes/workarea-3-1-40.html.md +126 -0
- data/docs/source/release-notes/workarea-3-1-41.html.md +128 -0
- data/docs/source/release-notes/workarea-3-1-42.html.md +105 -0
- data/docs/source/release-notes/workarea-3-1-43.html.md +37 -0
- data/docs/source/release-notes/workarea-3-1-44.html.md +82 -0
- data/docs/source/release-notes/workarea-3-1-45.html.md +153 -0
- data/docs/source/release-notes/workarea-3-1-46.html.md +91 -0
- data/docs/source/release-notes/workarea-3-1-47.html.md +65 -0
- data/docs/source/release-notes/workarea-3-1-48.html.md +46 -0
- data/docs/source/release-notes/workarea-3-1-49.html.md +23 -0
- data/docs/source/release-notes/workarea-3-1-5.html.md +169 -0
- data/docs/source/release-notes/workarea-3-1-50.html.md +42 -0
- data/docs/source/release-notes/workarea-3-1-51.html.md +25 -0
- data/docs/source/release-notes/workarea-3-1-52.html.md +57 -0
- data/docs/source/release-notes/workarea-3-1-6.html.md +117 -0
- data/docs/source/release-notes/workarea-3-1-7.html.md +176 -0
- data/docs/source/release-notes/workarea-3-1-8.html.md +283 -0
- data/docs/source/release-notes/workarea-3-1-9.html.md +212 -0
- data/docs/source/release-notes/workarea-3-2-0.html.md +1705 -0
- data/docs/source/release-notes/workarea-3-2-1.html.md +216 -0
- data/docs/source/release-notes/workarea-3-2-10.html.md +237 -0
- data/docs/source/release-notes/workarea-3-2-11.html.md +121 -0
- data/docs/source/release-notes/workarea-3-2-12.html.md +145 -0
- data/docs/source/release-notes/workarea-3-2-13.html.md +138 -0
- data/docs/source/release-notes/workarea-3-2-14.html.md +77 -0
- data/docs/source/release-notes/workarea-3-2-15.html.md +130 -0
- data/docs/source/release-notes/workarea-3-2-16.html.md +111 -0
- data/docs/source/release-notes/workarea-3-2-17.html.md +52 -0
- data/docs/source/release-notes/workarea-3-2-18.html.md +44 -0
- data/docs/source/release-notes/workarea-3-2-19.html.md +72 -0
- data/docs/source/release-notes/workarea-3-2-2.html.md +145 -0
- data/docs/source/release-notes/workarea-3-2-20.html.md +93 -0
- data/docs/source/release-notes/workarea-3-2-21.html.md +61 -0
- data/docs/source/release-notes/workarea-3-2-22.html.md +154 -0
- data/docs/source/release-notes/workarea-3-2-23.html.md +130 -0
- data/docs/source/release-notes/workarea-3-2-24.html.md +200 -0
- data/docs/source/release-notes/workarea-3-2-25.html.md +28 -0
- data/docs/source/release-notes/workarea-3-2-26.html.md +94 -0
- data/docs/source/release-notes/workarea-3-2-27.html.md +61 -0
- data/docs/source/release-notes/workarea-3-2-28.html.md +96 -0
- data/docs/source/release-notes/workarea-3-2-29.html.md +126 -0
- data/docs/source/release-notes/workarea-3-2-30.html.md +112 -0
- data/docs/source/release-notes/workarea-3-2-31.html.md +105 -0
- data/docs/source/release-notes/workarea-3-2-32.html.md +56 -0
- data/docs/source/release-notes/workarea-3-2-33.html.md +82 -0
- data/docs/source/release-notes/workarea-3-2-34.html.md +153 -0
- data/docs/source/release-notes/workarea-3-2-35.html.md +91 -0
- data/docs/source/release-notes/workarea-3-2-36.html.md +118 -0
- data/docs/source/release-notes/workarea-3-2-37.html.md +46 -0
- data/docs/source/release-notes/workarea-3-2-38.html.md +23 -0
- data/docs/source/release-notes/workarea-3-2-39.html.md +42 -0
- data/docs/source/release-notes/workarea-3-2-4.html.md +109 -0
- data/docs/source/release-notes/workarea-3-2-40.html.md +25 -0
- data/docs/source/release-notes/workarea-3-2-41.html.md +90 -0
- data/docs/source/release-notes/workarea-3-2-5.html.md +186 -0
- data/docs/source/release-notes/workarea-3-2-6.html.md +173 -0
- data/docs/source/release-notes/workarea-3-2-7.html.md +89 -0
- data/docs/source/release-notes/workarea-3-2-8.html.md +137 -0
- data/docs/source/release-notes/workarea-3-2-9.html.md +219 -0
- data/docs/source/release-notes/workarea-3-3-0.html.md +1272 -0
- data/docs/source/release-notes/workarea-3-3-1.html.md +324 -0
- data/docs/source/release-notes/workarea-3-3-10.html.md +69 -0
- data/docs/source/release-notes/workarea-3-3-11.html.md +72 -0
- data/docs/source/release-notes/workarea-3-3-12.html.md +136 -0
- data/docs/source/release-notes/workarea-3-3-13.html.md +61 -0
- data/docs/source/release-notes/workarea-3-3-14.html.md +196 -0
- data/docs/source/release-notes/workarea-3-3-15.html.md +167 -0
- data/docs/source/release-notes/workarea-3-3-16.html.md +234 -0
- data/docs/source/release-notes/workarea-3-3-17.html.md +82 -0
- data/docs/source/release-notes/workarea-3-3-18.html.md +165 -0
- data/docs/source/release-notes/workarea-3-3-19.html.md +106 -0
- data/docs/source/release-notes/workarea-3-3-2.html.md +72 -0
- data/docs/source/release-notes/workarea-3-3-20.html.md +116 -0
- data/docs/source/release-notes/workarea-3-3-21.html.md +228 -0
- data/docs/source/release-notes/workarea-3-3-22.html.md +125 -0
- data/docs/source/release-notes/workarea-3-3-23.html.md +154 -0
- data/docs/source/release-notes/workarea-3-3-24.html.md +70 -0
- data/docs/source/release-notes/workarea-3-3-25.html.md +114 -0
- data/docs/source/release-notes/workarea-3-3-26.html.md +260 -0
- data/docs/source/release-notes/workarea-3-3-27.html.md +138 -0
- data/docs/source/release-notes/workarea-3-3-28.html.md +147 -0
- data/docs/source/release-notes/workarea-3-3-29.html.md +63 -0
- data/docs/source/release-notes/workarea-3-3-3.html.md +153 -0
- data/docs/source/release-notes/workarea-3-3-30.html.md +102 -0
- data/docs/source/release-notes/workarea-3-3-31.html.md +57 -0
- data/docs/source/release-notes/workarea-3-3-32.html.md +44 -0
- data/docs/source/release-notes/workarea-3-3-33.html.md +114 -0
- data/docs/source/release-notes/workarea-3-3-4.html.md +332 -0
- data/docs/source/release-notes/workarea-3-3-5.html.md +242 -0
- data/docs/source/release-notes/workarea-3-3-6.html.md +100 -0
- data/docs/source/release-notes/workarea-3-3-7.html.md +148 -0
- data/docs/source/release-notes/workarea-3-3-8.html.md +163 -0
- data/docs/source/release-notes/workarea-3-3-9.html.md +93 -0
- data/docs/source/release-notes/workarea-3-4-0.html.md +580 -0
- data/docs/source/release-notes/workarea-3-4-1.html.md +150 -0
- data/docs/source/release-notes/workarea-3-4-10.html.md +72 -0
- data/docs/source/release-notes/workarea-3-4-11.html.md +60 -0
- data/docs/source/release-notes/workarea-3-4-12.html.md +155 -0
- data/docs/source/release-notes/workarea-3-4-2.html.md +188 -0
- data/docs/source/release-notes/workarea-3-4-3.html.md +136 -0
- data/docs/source/release-notes/workarea-3-4-4.html.md +114 -0
- data/docs/source/release-notes/workarea-3-4-5.html.md +275 -0
- data/docs/source/release-notes/workarea-3-4-6.html.md +169 -0
- data/docs/source/release-notes/workarea-3-4-7.html.md +162 -0
- data/docs/source/release-notes/workarea-3-4-8.html.md +95 -0
- data/docs/source/release-notes/workarea-3-4-9.html.md +135 -0
- data/docs/source/search.html.erb +34 -0
- data/docs/source/shared/_header.erb +61 -0
- data/docs/source/shared/_svgs.erb +17 -0
- data/docs/source/style_guide/index.html.erb +382 -0
- data/docs/source/stylesheets/_base.scss +125 -0
- data/docs/source/stylesheets/_components.scss +669 -0
- data/docs/source/stylesheets/_helpers.scss +10 -0
- data/docs/source/stylesheets/_opinions.scss +42 -0
- data/docs/source/stylesheets/_settings.scss +56 -0
- data/docs/source/stylesheets/_typography.scss +119 -0
- data/docs/source/stylesheets/site.css.scss +14 -0
- data/docs/source/stylesheets/vendor/_avalanche.scss +328 -0
- data/docs/source/stylesheets/vendor/_normalize.scss +341 -0
- data/docs/source/stylesheets/vendor/highlight/_tomorrow_night_blue.scss +75 -0
- data/docs/source/upgrade-guides.html.md +18 -0
- data/docs/source/upgrade-guides/workarea-3-4-0.html.md +152 -0
- data/docs/workarea_renderer.rb +8 -0
- data/docs/yarn.lock +2522 -0
- metadata +669 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
---
|
2
|
+
title: Define & Configure Inventory Policies
|
3
|
+
excerpt: Procedures to define additional inventory policies and configure available policies
|
4
|
+
---
|
5
|
+
|
6
|
+
Define & Configure Inventory Policies
|
7
|
+
======================================================================
|
8
|
+
|
9
|
+
Workarea includes multiple inventory policies, which encapsulate the logic for translating the administrable inventory values (e.g. `:available` and `:backordered`) into inventory SKU states (e.g. `#purchasable` and `#displayable`).
|
10
|
+
( See [Inventory: Inventory Policies & SKU States](inventory.html#inventory-policies-amp-sku-states_5) for a full explanation. )
|
11
|
+
The included policies cover most use cases, but in order to satisfy the business requirements of a retailer, you may need to add one or more additional policies, or you may need to otherwise configure which policies are available (e.g. remove policies or re-order them within the Admin).
|
12
|
+
|
13
|
+
To perform these tasks, you need to know how to define and configure inventory policies, which is the subject of this document.
|
14
|
+
To define your own policy, add a class which implements the inventory policy interface: `#available_to_sell`, `#displayable?`, and `#purchase`.
|
15
|
+
Then, to make the policy available, or to otherwise affect the available policies, manipulate the configurable inventory policy collection: `Workarea.config.inventory_policies`.
|
16
|
+
|
17
|
+
|
18
|
+
Define New Policies
|
19
|
+
----------------------------------------------------------------------
|
20
|
+
|
21
|
+
To define a new policy, add a class definition at the following path:
|
22
|
+
|
23
|
+
`<app or plugin root>/app/models/workarea/inventory/policies/<policy name>.rb`
|
24
|
+
|
25
|
+
Within this file, define a class within the module `Workarea::Inventory::Policies` that inherits from `Base` or a policy on which you will base the new policy.
|
26
|
+
|
27
|
+
Finally, implement or re-implement any of the following methods that are unique to your policy (if inheriting from `Base`, you'll need to implement all of them):
|
28
|
+
|
29
|
+
* `#available_to_sell`
|
30
|
+
* `#displayable?`
|
31
|
+
* `#purchase(quantity)`
|
32
|
+
|
33
|
+
If you are unfamiliar with any of these methods, see [Inventory: Inventory Policies & SKU States](inventory.html#inventory-policies-amp-sku-states_5) and [Inventory: Purchasing, Capturing, and Releasing Inventory](inventory.html#purchasing-capturing-amp-releasing-inventory_14), and refer to the implementations of these methods within the existing inventory policies.
|
34
|
+
The following command will print the pathnames of the inventory policies available to your application:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
find $(pwd) $(bundle show --paths | grep workarea) \
|
38
|
+
-path '*/app/*/inventory/policies/*.rb' | sort -u
|
39
|
+
```
|
40
|
+
|
41
|
+
|
42
|
+
### Examples
|
43
|
+
|
44
|
+
As an example, the "offline" policy ensures a shopper can view the item on the website but cannot purchase it (which must be done over the phone or by some other means explained on the screen):
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# <app or plugin root>/app/models/workarea/inventory/policies/offline.rb
|
48
|
+
|
49
|
+
module Workarea
|
50
|
+
module Inventory
|
51
|
+
module Policies
|
52
|
+
class Offline < Base
|
53
|
+
def displayable?
|
54
|
+
true
|
55
|
+
end
|
56
|
+
|
57
|
+
def available_to_sell
|
58
|
+
0
|
59
|
+
end
|
60
|
+
|
61
|
+
def purchase(quantity)
|
62
|
+
# noop
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
The "in store only" policy relies on other extensions that exist in the application or plugin:
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
# <app or plugin root>/app/models/workarea/inventory/policies/in_store_only.rb
|
74
|
+
|
75
|
+
module Workarea
|
76
|
+
module Inventory
|
77
|
+
module Policies
|
78
|
+
class InStoreOnly < Standard
|
79
|
+
def available_to_sell
|
80
|
+
sku.available_in_store
|
81
|
+
end
|
82
|
+
|
83
|
+
def purchase(quantity)
|
84
|
+
# noop
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
92
|
+
|
93
|
+
Configure Available Policies
|
94
|
+
----------------------------------------------------------------------
|
95
|
+
|
96
|
+
Add your new policy to the configurable collection of available inventory policies:
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
# <app or plugin root>/config/initializers/inventory_policies.rb
|
100
|
+
|
101
|
+
Workarea.config.inventory_policies << 'Workarea::Inventory::Policies::Offline'
|
102
|
+
```
|
103
|
+
|
104
|
+
You can also remove or sort the policies using the methods of [SwappableList](swappable-list-data-structure.html).
|
105
|
+
When saving an inventory policy, its policy is validated to ensure it is a member of this collection.
|
106
|
+
And this is the list of policies that is presented for selection within the inventory SKU administration screens.
|
107
|
+
The first policy in this collection is the default policy for new inventory SKUs.
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
title: Documentation Style Guide
|
3
|
+
excerpt: Documentation contributions should uphold the following style rules
|
4
|
+
---
|
5
|
+
|
6
|
+
# Documentation Style Guide
|
7
|
+
|
8
|
+
Documentation contributions should uphold the following style rules.
|
9
|
+
|
10
|
+
## Voice
|
11
|
+
|
12
|
+
Write as an expert on the software, rather than one of its maintainers. This encourages contributions. For example, instead of “we decided to change…”, use “Workarea 3.3 changes…”.
|
13
|
+
|
14
|
+
## Titles & Headings
|
15
|
+
|
16
|
+
The title of each document and the heading of each document section should describe either a concept or the procedure to complete a task. Use _nouns_ for titles and headings that represent _concepts_. Use _verbs_ to represent _tasks_.
|
17
|
+
|
18
|
+
Capitalize the first word and important words.
|
19
|
+
|
20
|
+
Examples (concepts):
|
21
|
+
|
22
|
+
- Content
|
23
|
+
- Plugins
|
24
|
+
- Orders & Items
|
25
|
+
- Placing Orders
|
26
|
+
|
27
|
+
Examples (tasks):
|
28
|
+
|
29
|
+
- Add System Content
|
30
|
+
- Release a Plugin
|
31
|
+
- Export Orders
|
32
|
+
- Place an Order
|
33
|
+
|
34
|
+
Try to limit outline depth to three levels (h1-h3). If you find yourself needing a deeper outline, consider re-organizing the content into multiple documents.
|
35
|
+
|
36
|
+
## Proper Nouns
|
37
|
+
|
38
|
+
Names of software packages, such as _Admin_ and _Storefront_ are proper nouns, which are capitalized.
|
39
|
+
|
40
|
+
Names of features are _not_ proper nouns and are not capitalized. Examples:
|
41
|
+
|
42
|
+
- cart
|
43
|
+
- checkout
|
44
|
+
- Admin toolbar
|
45
|
+
|
46
|
+
## Spelling & Grammar
|
47
|
+
|
48
|
+
At this time there are no prescribed style rules regarding spelling, grammar, and language. However, always use a spell checker before submitting contributions.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
title: Documentation
|
3
|
+
excerpt: Workarea documentation is managed and versioned with the platform source code
|
4
|
+
---
|
5
|
+
|
6
|
+
# Documentation
|
7
|
+
|
8
|
+
Workarea documentation is managed and versioned with the platform source code.
|
9
|
+
|
10
|
+
## Published Documentation
|
11
|
+
|
12
|
+
Documentation is published automatically each time a new version of the platform is released. Beginning with Workarea 3.3, each major and minor version of the platform has its own documentation.
|
13
|
+
|
14
|
+
## Documentation Build System
|
15
|
+
|
16
|
+
A documentation build system builds the published documentation from the documentation sources that are included within each distribution of the platform.
|
17
|
+
|
18
|
+
The build system is based on [the Middleman static site generator](https://middlemanapp.com). The build system and documentation sources are located at _/docs_ within the Workarea source.
|
19
|
+
|
20
|
+
### Navigation
|
21
|
+
|
22
|
+
The build system includes [Middleman-NavTree](https://github.com/bryanbraun/middleman-navtree) for constructing navigation. The YAML file at the path _docs/data/articles.yml_ declares a tree representing the relationships of the platform article documents.
|
23
|
+
|
24
|
+
### Search
|
25
|
+
|
26
|
+
The build system includes [Middleman::Search](https://github.com/manastech/middleman-search) to provide search functionality.
|
27
|
+
|
28
|
+
This features requires each document to specify frontmatter for use in the search index. See [Document Source Files](#document-source-files) below.
|
29
|
+
|
30
|
+
## Documentation Sources
|
31
|
+
|
32
|
+
Within Workarea's _/doc_ directory, documentation source files and files that make up the build system are organized according to the [Middleman directory structure](https://middlemanapp.com/basics/directory-structure/).
|
33
|
+
|
34
|
+
### Image Source Files
|
35
|
+
|
36
|
+
Image source files are PNG or JPG files whose pathnames match the following pattern:
|
37
|
+
|
38
|
+
_docs/source/images/\*.{png,jpg}_
|
39
|
+
|
40
|
+
Words within filenames are separated with paths since the filenames are used in published URLs.
|
41
|
+
|
42
|
+
### Document Source Files
|
43
|
+
|
44
|
+
The pathnames of document source files match the following pattern:
|
45
|
+
|
46
|
+
_docs/source/{articles,release-notes}/\*.html.md_
|
47
|
+
|
48
|
+
Words within filenames are separated with paths since the filenames are used in published URLs.
|
49
|
+
|
50
|
+
The format of these documents is proprietary to the build system.
|
51
|
+
|
52
|
+
Each file begins with [YAML frontmatter](https://middlemanapp.com/basics/frontmatter/#yaml-frontmatter), which declares a title and excerpt used for search functionality.
|
53
|
+
|
54
|
+
Following the frontmatter is [Redcarpet](https://github.com/vmg/redcarpet) markdown with the `:tables`, `:no_intra_emphasis`, and `:fenced_code_blocks` extensions enabled.
|
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
title: Domain Modeling
|
3
|
+
excerpt: Here are a few key concepts related to domain modeling and how they are applied within the platform.
|
4
|
+
---
|
5
|
+
|
6
|
+
# Domain Modeling
|
7
|
+
|
8
|
+
Here are a few key concepts related to domain modeling and how they are applied within the platform.
|
9
|
+
|
10
|
+
**Note:** It's important to keep in mind these are guidelines, and are not followed completely or religiously. Instead, think of them as heuristics when reading the code or extending elements of the platform.
|
11
|
+
|
12
|
+
## Bounded Contexts
|
13
|
+
|
14
|
+
With large domains (ecommerce is certainly one of these), it becomes difficult to track the intricacies of how models relate to one another. Therefore, Workarea separates these models into different contexts as a way to break down the bigger picture into more manageable pieces. Each context addresses a single problem or set of problems within the larger system. This technique reduces coupling along domain lines and allows functionality to change independently.
|
15
|
+
|
16
|
+
To see this in Workarea, look at how the `app/models` directory in Workarea Core is divided. Each subdirectory is a bounded context, such as the following:
|
17
|
+
|
18
|
+
- `Catalog`
|
19
|
+
- `Content`
|
20
|
+
- `Fulfillment`
|
21
|
+
- `Inventory`
|
22
|
+
- `Navigation`
|
23
|
+
- `Order`
|
24
|
+
- `Payment`
|
25
|
+
- `Pricing`
|
26
|
+
- `Recommendation`
|
27
|
+
- `Shipping`
|
28
|
+
- `Tax`
|
29
|
+
- `User`
|
30
|
+
|
31
|
+
### Orders Example
|
32
|
+
|
33
|
+
From a customer's perspective, an "order" might contain the following elements:
|
34
|
+
|
35
|
+
- Products
|
36
|
+
- Prices
|
37
|
+
- Shipping method
|
38
|
+
- Credit card
|
39
|
+
|
40
|
+
By handling these problems separately, the code/modeling/logic for each is much simpler and less coupled. For instance, logic around what shipping methods are available has no coupling to putting together the pricing for the order, even though shipping methods will always have and depend on a price.
|
41
|
+
|
42
|
+
However, to present the order to the customer, Workarea pulls:
|
43
|
+
|
44
|
+
- Some products from the `Catalog::Product` class
|
45
|
+
- Pricing for the order items from the `Pricing` engine
|
46
|
+
- Available shipping methods from the `Shipping::Method` class
|
47
|
+
- A credit card from the `Payment`
|
48
|
+
|
49
|
+
This is the responsibility of the view model layer (and one of the reasons it exists).
|
50
|
+
|
51
|
+
### Pricing Example
|
52
|
+
|
53
|
+
In another example, pricing from a business user's perspective probably includes several elements:
|
54
|
+
|
55
|
+
- SKU price
|
56
|
+
- Discounts
|
57
|
+
- Shipping costs
|
58
|
+
- Taxes
|
59
|
+
|
60
|
+
This can get quite complicated, so it is effective to break the problem apart:
|
61
|
+
|
62
|
+
- SKU price - stored and calculated in the `Pricing` engine
|
63
|
+
- Discounts - stored and calculated in the `Pricing` engine
|
64
|
+
- Shipping costs - stored and calculated by the `Shipping` module and totalled by the `Pricing` engine
|
65
|
+
- Taxes - rates are stored calculated by the `Tax` module, but applied by the `Pricing` engine
|
66
|
+
|
67
|
+
This design makes it much easier to swap out how shipping or taxes are determined. These can be significant problems in their own right, and many implementations use third parties for these purposes.
|
68
|
+
|
69
|
+
## Shared Models
|
70
|
+
|
71
|
+
There are some things that the contexts share. Changing these classes may/will require cooperation from a potentially broad range of classes, so it's a risky move.
|
72
|
+
|
73
|
+
Examples of classes that are shared include:
|
74
|
+
|
75
|
+
- `Address` - generically models an address
|
76
|
+
- `PriceAdjustment` - represents an adjustment to price, used for tracking/calculating prices
|
77
|
+
- `Region` and `Country` - models countries and subdivisions of countries
|
78
|
+
- `ShippingOption` - models a shipping method selectable or selected by a user
|
79
|
+
|
80
|
+
So `PriceAdjustment` is used by the `Pricing` engine to create the pricing on the `Order`, `Shipping::Shipment`, etc.
|
81
|
+
|
82
|
+
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
title: Error Pages
|
3
|
+
excerpt: Workarea Storefront provides an errors controller through which it routes all 404 and 500 errors, and an errors view, which it conditionally renders for HTML responses in place of the static 404 and 500 error pages provided by Rails.[1] Storefront err
|
4
|
+
---
|
5
|
+
|
6
|
+
# Error Pages
|
7
|
+
|
8
|
+
Workarea Storefront provides an errors controller through which it routes all 404 and 500 errors, and an errors view, which it conditionally renders for HTML responses in place of the static 404 and 500 error pages provided by Rails.<sup><a href="#notes" id="note-1-context">[1]</a></sup> Storefront error pages provide several advantages over the Rails defaults.
|
9
|
+
|
10
|
+
- Each error page renders with administrable system content, specific to the error type (404 or 500)
|
11
|
+
- The error pages use the Storefront layout, providing a consistent look and feel, as well as global functionality such as search and navigation
|
12
|
+
- The errors view is a standard Workarea view, which you can [override](overriding.html) to extend as necessary
|
13
|
+
|
14
|
+
For these reasons, **Workarea 3.3 changes error page rendering to _always_ use Workarea error pages instead of the Rails defaults**.
|
15
|
+
|
16
|
+
## Use Workarea Error Pages
|
17
|
+
|
18
|
+
To use the Storefront errors view with administrable content in place of the default Rails error pages, ensure [system contents](content.html#system-content) with the following names exist within each environment:
|
19
|
+
|
20
|
+
- `'Not Found'` for 404 pages
|
21
|
+
- `'Internal Server Error'` for 500 pages
|
22
|
+
|
23
|
+
(Since Workarea 3.3, the errors controller creates these contents on demand, so it isn't necessary to create them in advance. However, you should create them if the retailer would like to customize the content for these pages.)
|
24
|
+
|
25
|
+
The default customer service pages [seeds](seeds.html) create these system contents within development environments. For all other environments, create these contents through any Ruby interface to which you have access (e.g. Rails console/runner/task). Refer to the example in Listing 1.
|
26
|
+
|
27
|
+
<!-- <figure id="listing-1">
|
28
|
+
<figcaption>
|
29
|
+
<p>Listing 1: Excerpt from <i>workarea-core-3.2.4/app/seeds/workarea/customer_service_pages_seeds.rb</i></p>
|
30
|
+
</figcaption> -->
|
31
|
+
|
32
|
+
Listing 1: Excerpt from _workarea-core-3.2.4/app/seeds/workarea/customer\_service\_pages\_seeds.rb_
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
module Workarea
|
36
|
+
class CustomerServicePagesSeeds
|
37
|
+
def perform
|
38
|
+
puts 'Adding auxiliary pages...'
|
39
|
+
|
40
|
+
<var># …</var>
|
41
|
+
|
42
|
+
internal_error_page = Content.for('Internal Server Error')
|
43
|
+
internal_error_page.save!
|
44
|
+
|
45
|
+
not_found_content = Content.for('Not Found')
|
46
|
+
not_found_content.blocks.build(
|
47
|
+
type: :html,
|
48
|
+
data: {
|
49
|
+
html: '<p>Try searching or <a href="/">start at the home page</a>.</p>'
|
50
|
+
}
|
51
|
+
)
|
52
|
+
not_found_content.save!
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
```
|
57
|
+
<!-- </figure> -->
|
58
|
+
|
59
|
+
Next, edit the content for these pages within each environment and view the results.
|
60
|
+
|
61
|
+
<figure id="figure-1">
|
62
|
+
<figcaption>
|
63
|
+
<p>Figure 1: Administration of the 404 system content</p>
|
64
|
+
</figcaption>
|
65
|
+
<p><%= image_tag "images/404-system-content-admin.png", alt: "The admin for 404 system content" %></p>
|
66
|
+
</figure><figure id="figure-2">
|
67
|
+
<figcaption>
|
68
|
+
<p>Figure 2: A Storefront 404 error page in a development environment</p>
|
69
|
+
</figcaption>
|
70
|
+
<p><%= image_tag "images/404-storefront-error-page.png", alt: "A 404 page in the Storefront" %></p>
|
71
|
+
</figure>
|
72
|
+
|
73
|
+
## View Production Error Pages in Development
|
74
|
+
|
75
|
+
By default, Rails responds to an error in development with a debugging page. To view production error pages in development, you must change this behavior. Modify your application’s development configuration as shown in the following patch:
|
76
|
+
|
77
|
+
```
|
78
|
+
--- config/environments/development.rb.old 2018-03-20 15:37:21.000000000 -0400
|
79
|
+
+++ config/environments/development.rb 2018-03-20 15:37:04.000000000 -0400
|
80
|
+
@@ -14,7 +14,7 @@
|
81
|
+
config.eager_load = false
|
82
|
+
|
83
|
+
# Show full error reports.
|
84
|
+
- config.consider_all_requests_local = true
|
85
|
+
+ config.consider_all_requests_local = false
|
86
|
+
|
87
|
+
# Enable/disable caching. By default caching is disabled.
|
88
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
89
|
+
```
|
90
|
+
|
91
|
+
After changing your configuration, restart the application.
|
92
|
+
|
93
|
+
## Notes
|
94
|
+
|
95
|
+
[1] Specifically, the paths `'/404'` and `'/500'` (regardless of HTTP method) are routed to the `not_found` and `internal` actions of the `Storefront::ErrorsController`, each of which conditionally renders the _workarea/storefront/errors/show.html.haml_ view.
|
@@ -0,0 +1,152 @@
|
|
1
|
+
---
|
2
|
+
title: Extension
|
3
|
+
excerpt: Extension is the process of adding, modifying, or even removing Workarea platform functionality from within a Workarea application or plugin. Workarea plugins extend the platform in ways that are re-usable across applications, while individual applica
|
4
|
+
---
|
5
|
+
|
6
|
+
# Extension
|
7
|
+
|
8
|
+
<dfn>Extension</dfn> is the process of adding, modifying, or even removing Workarea platform functionality from within a Workarea application or plugin. Workarea plugins extend the platform in ways that are re-usable across applications, while individual applications extend the platform further to meet the specific needs of a retailer or other stakeholders. While administration allows for platform customization through a UI, extension allows for deeper customization via code changes.
|
9
|
+
|
10
|
+
The code changes performed for extension may conflict with the platform's own code changes between versions. When upgrading to a new version of Workarea, application and plugin developers must resolve these conflicts. Developers must therefore consider the long term cost of extension. Another concern is the initial implementation cost of an extension.
|
11
|
+
|
12
|
+
This document provides an overview of extension techniques for easier comparison, while other guides describe various techniques in greater detail.
|
13
|
+
|
14
|
+
## Augmentation
|
15
|
+
|
16
|
+
One form of extension is simple <dfn>augmentation</dfn>—adding new code within the Workarea namespace. For example, your application may require a calendar of events. Such a feature is entirely new and does not overlap with any existing platform functionality. However, to provide consistent user and developer experiences, it makes sense to add your new code (such as models, views, and controllers) within the Workarea namespace. It also makes sense to leverage Workarea patterns, such as the use of additional object types (e.g. view models, workers), and to follow Workarea conventions (e.g. file naming and structuring).
|
17
|
+
|
18
|
+
## Domain-Specific Extension
|
19
|
+
|
20
|
+
Workarea provides various _designed_ points of extension that employ conventions, inheritance, DSLs, and other techniques to reduce cost during the initial implementation, and potentially at upgrade time. These techniques are domain-specific, so within this documentation, I cover each where that particular domain aspect is covered. Examples of these extension points are listed below. <sup><a href="#notes" id="note-1-context">[1]</a></sup>
|
21
|
+
|
22
|
+
- Catalog customizations
|
23
|
+
- [Content block types](add-a-content-block-type.html)
|
24
|
+
- [Discount types](create-a-custom-discount.html)
|
25
|
+
- Inventory policies
|
26
|
+
- [Payment gateways](integrate-a-payment-gateway.html)
|
27
|
+
- [Pricing calculators](customize-pricing.html)
|
28
|
+
- Product templates
|
29
|
+
- Seeds
|
30
|
+
- Shipping carriers
|
31
|
+
- Storefront search middlewares
|
32
|
+
|
33
|
+
## Generic Extension
|
34
|
+
|
35
|
+
Workarea also provides generic extension techniques that apply across domain boundaries and allow for extensions beyond those specifically designed into the platform.
|
36
|
+
|
37
|
+
### Configuration
|
38
|
+
|
39
|
+
[Configuration](configuration.html) allows developers to customize specific programmatic values in Ruby and JavaScript.
|
40
|
+
|
41
|
+
#### Summary
|
42
|
+
|
43
|
+
- Allows applications and plugins to customize configuration values defined by the core platform and plugins
|
44
|
+
- Allows plugins to define their own configuration values to be customized by applications and other plugins
|
45
|
+
- Applications and plugins write configuration code within their own Ruby and JavaScript configuration files
|
46
|
+
- Configuration can affect any aspect of the platform, from the number of products to show in a content block to the list of calculators used to calculate pricing
|
47
|
+
|
48
|
+
#### Limitations
|
49
|
+
|
50
|
+
- Configuration is limited to specific values defined as configurable by the core platform and plugins
|
51
|
+
- Most configuration values are simple values (often integers) or collections/lists of those values
|
52
|
+
|
53
|
+
#### Test Considerations
|
54
|
+
|
55
|
+
- The scope/reach of a configuration tends to be limited, however, configuration may break tests or create the need for new tests
|
56
|
+
- After configuring your app or plugin, write new tests or decorate existing tests as necessary
|
57
|
+
|
58
|
+
#### Upgrade Considerations
|
59
|
+
|
60
|
+
- When Workarea makes configuration changes between versions, those changes are generally applied seamlessly to your application or plugin when you upgrade your Workarea version
|
61
|
+
- However, if Workarea has changed any config values that you have replaced with your own, you will need to apply those changes manually if necessary
|
62
|
+
- When customizing config values that represent collections, mutate the collection (prepend, append, delete member, etc) rather than replacing it to ensure Workarea's changes to the collection are applied when upgrading
|
63
|
+
- For example, if adding a product template, append your custom value to the existing list of templates instead of replacing the entire list
|
64
|
+
|
65
|
+
### Decoration
|
66
|
+
|
67
|
+
[Decoration](decoration.html) allows developers to customize Ruby classes.
|
68
|
+
|
69
|
+
#### Summary
|
70
|
+
|
71
|
+
- Allows applications and plugins to customize Ruby classes defined by the core platform and plugins
|
72
|
+
- Within these customizations, developers may add new instance and class methods, modify existing instance and class methods (with access to the pre-customized implementation via `super`), and execute class macros or other code as if inside the original class definition
|
73
|
+
- Decoration allows for extensive customization of Ruby code, going far beyond the extension points designed into the platform
|
74
|
+
- Because test cases are Ruby classes, decoration also allows for customization of the test suite
|
75
|
+
|
76
|
+
#### Limitations
|
77
|
+
|
78
|
+
- Decoration allows for the customization of Ruby classes only—modules are not supported at this time
|
79
|
+
- Decoration cannot be used to customize code written using other language or file types (such as JavaScript and other UI code)
|
80
|
+
|
81
|
+
#### Test Considerations
|
82
|
+
|
83
|
+
- Decoration is likely to break existing tests or create the need for additional tests
|
84
|
+
- When using decoration to customize functionality, write new tests or decorate existing tests as necessary
|
85
|
+
|
86
|
+
#### Upgrade Considerations
|
87
|
+
|
88
|
+
- When Workarea changes Ruby code between versions, those changes are generally applied seamlessly to your application or plugin when you upgrade your Workarea version
|
89
|
+
- However, if Workarea has changed methods you have replaced with your own implementations, you will need to apply those changes manually if necessary
|
90
|
+
- When decorating classes, change only the aspects of the class necessary for your requirements, and use `super` to maintain original method implementations where possible
|
91
|
+
|
92
|
+
### Appending
|
93
|
+
|
94
|
+
[Appending](appending.html) allows developers to inject their own views and assets into existing user interfaces.
|
95
|
+
|
96
|
+
#### Summary
|
97
|
+
|
98
|
+
- Allows plugins and applications to render their own (new) partials within existing platform views at designated positions
|
99
|
+
- Allows plugins and applications to include their own (new) assets within existing platform asset manifests
|
100
|
+
- Plugins and apps create their own partials and assets, and assign these to platform append points within an initializer or other configuration file
|
101
|
+
|
102
|
+
#### Limitations
|
103
|
+
|
104
|
+
- This technique is limited in scope/reach as it allows only for the injection of new UI code
|
105
|
+
- Appending generally provides little control over position and display
|
106
|
+
- New code may be injected into only the designated append points provided by the platform
|
107
|
+
- There are no formal APIs to remove files from append points or re-order files within append points
|
108
|
+
- Without also leveraging overriding, you cannot change the position of an append point within a view
|
109
|
+
|
110
|
+
#### Test Considerations
|
111
|
+
|
112
|
+
- Appending is likely to break existing tests or create the need for additional tests
|
113
|
+
- When appending files, write new tests or decorate existing tests as necessary
|
114
|
+
|
115
|
+
#### Upgrade Considerations
|
116
|
+
|
117
|
+
- Appending is a simple way of introducing new code into the platform and therefore has few upgrade concerns
|
118
|
+
- Unlike other extension techniques, appending is not used to customize existing code; it therefore avoids many of the concerns affecting other extension techniques
|
119
|
+
|
120
|
+
### Overriding
|
121
|
+
|
122
|
+
[Overriding](overriding.html) allows developers to replace user interface files such as views and assets with their own customized copies of the files.
|
123
|
+
|
124
|
+
#### Summary
|
125
|
+
|
126
|
+
- Allows applications (and in rare cases, plugins) to completely replace existing platform views and assets
|
127
|
+
- Applications copy the views and assets into their own source and customize the files as needed
|
128
|
+
- Overriding allows developers to completely replace all HTML and assets served by the application, allowing UI customization that goes far beyond any specifically designed extension points
|
129
|
+
|
130
|
+
#### Limitations
|
131
|
+
|
132
|
+
- Overriding affects only views, layouts, partials, and files served by the asset pipeline (UI customization)
|
133
|
+
- Except in rare cases, plugins should not use overrides (see [Overriding](overriding.html) for more on this)
|
134
|
+
|
135
|
+
#### Test Considerations
|
136
|
+
|
137
|
+
- Overriding is likely to break existing tests or create the need for additional tests
|
138
|
+
- When overriding, write new tests or decorate existing tests as necessary
|
139
|
+
|
140
|
+
#### Upgrade Considerations
|
141
|
+
|
142
|
+
- Overriding completely replaces platform files with your own copies
|
143
|
+
- When Workarea changes views and assets between versions, these changes will not appear in your application if you are overriding the affected files
|
144
|
+
- You must apply these changes manually to your own copies of the files
|
145
|
+
- While overriding is necessary for UI customization, try to override only the files necessary for your requirements
|
146
|
+
- Where possible, use appending instead of overriding to reduce upgrade cost
|
147
|
+
|
148
|
+
## Notes
|
149
|
+
|
150
|
+
[1] Much of the domain-specific documentation is still forthcoming. I will continue to cross reference these extension points as coverage is added.
|
151
|
+
|
152
|
+
|