workarea 3.4.16 → 3.4.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +81 -0
- metadata +10 -579
- data/docs/Gemfile +0 -8
- data/docs/Gemfile.lock +0 -130
- data/docs/bin/middleman +0 -29
- data/docs/config.rb +0 -87
- data/docs/config.ru +0 -7
- data/docs/data/articles.yml +0 -157
- data/docs/package.json +0 -15
- data/docs/source/404.html.erb +0 -13
- data/docs/source/articles/access-routes-in-javascript.html.md +0 -33
- data/docs/source/articles/add-a-content-area.html.md +0 -169
- data/docs/source/articles/add-a-content-block-type.html.md +0 -334
- data/docs/source/articles/add-a-report.html.md +0 -202
- data/docs/source/articles/add-css-through-the-admin-ui.html.md +0 -30
- data/docs/source/articles/add-javascript-through-a-manifest.html.md +0 -367
- data/docs/source/articles/add-javascript-through-a-view.html.md +0 -80
- data/docs/source/articles/add-javascript-through-the-admin-ui.html.md +0 -30
- data/docs/source/articles/add-metrics.html.md +0 -58
- data/docs/source/articles/add-or-replace-a-pricing-calculator.html.md +0 -150
- data/docs/source/articles/add-remove-or-change-a-mongoid-validation.html.md +0 -147
- data/docs/source/articles/add-remove-or-change-a-product-template.html.md +0 -142
- data/docs/source/articles/add-remove-sort-and-group-storefront-search-filters.html.md +0 -483
- data/docs/source/articles/add-stylesheets-through-a-manifest.html.md +0 -276
- data/docs/source/articles/add-system-content.html.md +0 -138
- data/docs/source/articles/analytics-overview.html.md +0 -51
- data/docs/source/articles/analyze-storefront-search-results.html.md +0 -261
- data/docs/source/articles/api-overview.html.md +0 -35
- data/docs/source/articles/appending.html.md +0 -506
- data/docs/source/articles/application-document.html.md +0 -88
- data/docs/source/articles/automated-javascript-testing.html.md +0 -162
- data/docs/source/articles/b2b-overview.html.md +0 -64
- data/docs/source/articles/browser-and-device-support.html.md +0 -47
- data/docs/source/articles/change-product-placeholder-image.html.md +0 -39
- data/docs/source/articles/change-storefront-search-results.html.md +0 -283
- data/docs/source/articles/change-the-storefront-product-pricing-ui.html.md +0 -348
- data/docs/source/articles/change-the-storefront-search-filters-ui.html.md +0 -103
- data/docs/source/articles/checkout.html.md +0 -479
- data/docs/source/articles/commerce-model.html.md +0 -164
- data/docs/source/articles/configuration-for-hosting.html.md +0 -106
- data/docs/source/articles/configuration.html.md +0 -406
- data/docs/source/articles/configure-a-payment-gateway.html.md +0 -58
- data/docs/source/articles/configure-asset-storage.html.md +0 -29
- data/docs/source/articles/configure-asset-types.html.md +0 -18
- data/docs/source/articles/configure-contact-form-subjects-list.html.md +0 -24
- data/docs/source/articles/configure-imageoptim.html.md +0 -23
- data/docs/source/articles/configure-locales.html.md +0 -45
- data/docs/source/articles/configure-logins-and-authentication.html.md +0 -42
- data/docs/source/articles/configure-low-inventory-threshold.html.md +0 -26
- data/docs/source/articles/configure-product-image-sizes-and-processing.html.md +0 -28
- data/docs/source/articles/content.html.md +0 -554
- data/docs/source/articles/contentable.html.md +0 -41
- data/docs/source/articles/contribute-code.html.md +0 -69
- data/docs/source/articles/contribute-documentation.html.md +0 -60
- data/docs/source/articles/create-a-custom-discount.html.md +0 -234
- data/docs/source/articles/create-a-new-app.html.md +0 -131
- data/docs/source/articles/create-a-plugin.html.md +0 -19
- data/docs/source/articles/create-a-style-guide.html.md +0 -71
- data/docs/source/articles/create-a-theme.html.md +0 -134
- data/docs/source/articles/css-architectural-overview.html.md +0 -89
- data/docs/source/articles/customize-a-helper.html.md +0 -91
- data/docs/source/articles/decoration.html.md +0 -415
- data/docs/source/articles/define-and-configure-inventory-policies.html.md +0 -107
- data/docs/source/articles/documentation-style-guide.html.md +0 -48
- data/docs/source/articles/documentation.html.md +0 -54
- data/docs/source/articles/domain-modeling.html.md +0 -82
- data/docs/source/articles/error-pages.html.md.erb +0 -95
- data/docs/source/articles/extension-overview.html.md +0 -152
- data/docs/source/articles/favicon-support.html.md +0 -112
- data/docs/source/articles/feature-spec-helper-stylesheet.html.md +0 -25
- data/docs/source/articles/featurejs-and-feature-spec-helper.html.md +0 -20
- data/docs/source/articles/help-and-support.html.md +0 -34
- data/docs/source/articles/html-fragment-caching.html.md +0 -46
- data/docs/source/articles/http-caching.html.md +0 -43
- data/docs/source/articles/i18n.html.md +0 -35
- data/docs/source/articles/images-flow.html.md +0 -10
- data/docs/source/articles/index-storefront-search-documents.html.md +0 -104
- data/docs/source/articles/infrastructure.html.md +0 -46
- data/docs/source/articles/installing.html.md +0 -61
- data/docs/source/articles/integrate-a-payment-gateway.html.md +0 -124
- data/docs/source/articles/integrate-a-web-analytics-provider.html.md +0 -35
- data/docs/source/articles/integrate-an-inventory-management-system.html.md +0 -88
- data/docs/source/articles/integrating-with-other-software.html.md +0 -59
- data/docs/source/articles/inventory.html.md +0 -352
- data/docs/source/articles/javascript-coding-standards.html.md +0 -30
- data/docs/source/articles/javascript-modules.html.md +0 -174
- data/docs/source/articles/javascript-overview.html.md +0 -62
- data/docs/source/articles/javascript-reference-documentation.html.md +0 -51
- data/docs/source/articles/javascript-templates.html.md +0 -52
- data/docs/source/articles/low-level-caching.html.md +0 -25
- data/docs/source/articles/maintain-a-plugin.html.md +0 -12
- data/docs/source/articles/maintenance-policy.html.md +0 -79
- data/docs/source/articles/navigable.html.md +0 -51
- data/docs/source/articles/navigating-the-code.html.md +0 -149
- data/docs/source/articles/navigation.html.md +0 -386
- data/docs/source/articles/order-life-cycle.html.md +0 -546
- data/docs/source/articles/order-pricing.html.md +0 -389
- data/docs/source/articles/orders-and-items.html.md +0 -210
- data/docs/source/articles/orders.html.md +0 -66
- data/docs/source/articles/overriding.html.md +0 -155
- data/docs/source/articles/overview.html.md +0 -43
- data/docs/source/articles/plugins-overview.html.md +0 -12
- data/docs/source/articles/prerequisites-and-dependencies.html.md +0 -202
- data/docs/source/articles/products.html.md.erb +0 -1270
- data/docs/source/articles/progressive-web-application-support.html.md +0 -148
- data/docs/source/articles/rails-asset-manifests.html.md +0 -33
- data/docs/source/articles/rails-asset-view-helpers.html.md +0 -25
- data/docs/source/articles/reading-data.html.md +0 -10
- data/docs/source/articles/releasable.html.md +0 -37
- data/docs/source/articles/report-a-bug.html.md +0 -75
- data/docs/source/articles/ruby-coding-standards.html.md +0 -10
- data/docs/source/articles/run-sidekiq-in-a-local-environment.html.md +0 -40
- data/docs/source/articles/searching.html.md +0 -1005
- data/docs/source/articles/security-policy.html.md +0 -42
- data/docs/source/articles/seeds.html.md +0 -345
- data/docs/source/articles/shipping.html.md +0 -756
- data/docs/source/articles/sort-and-exclude-product-options.html.md +0 -47
- data/docs/source/articles/storefront-search-features.html.md +0 -568
- data/docs/source/articles/storefront-searches.html.md +0 -126
- data/docs/source/articles/style-guides.html.md +0 -21
- data/docs/source/articles/stylesheet-coding-standards.html.md +0 -24
- data/docs/source/articles/stylesheets-overview.html.md +0 -67
- data/docs/source/articles/swappable-list-data-structure.html.md +0 -81
- data/docs/source/articles/system-emails.html.md +0 -102
- data/docs/source/articles/taggable.html.md +0 -8
- data/docs/source/articles/test-a-credit-card-transaction.html.md +0 -16
- data/docs/source/articles/test-if-a-plugin-is-installed.html.md +0 -34
- data/docs/source/articles/testing.html.md +0 -914
- data/docs/source/articles/themes-overview.html.md +0 -155
- data/docs/source/articles/translate-administrable-content.html.md +0 -14
- data/docs/source/articles/translate-javascript-content.html.md +0 -16
- data/docs/source/articles/translate-or-customize-message-content.html.md +0 -29
- data/docs/source/articles/translate-or-customize-static-content.html.md +0 -30
- data/docs/source/articles/use-an-existing-workarea-app.html.md +0 -108
- data/docs/source/articles/view-models.html.md +0 -509
- data/docs/source/articles/views.html.md +0 -14
- data/docs/source/articles/workers.html.md +0 -613
- data/docs/source/articles/writing-data.html.md +0 -10
- data/docs/source/cli.html.md +0 -163
- 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 +0 -1
- data/docs/source/images/arrow_white.svg +0 -1
- 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 +0 -1
- 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 +0 -1
- data/docs/source/images/image-group-content-block-in-storefront.png +0 -0
- data/docs/source/images/images.svg +0 -1
- 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 +0 -1
- data/docs/source/images/menu.svg +0 -2
- data/docs/source/images/mongo-replica-set.svg +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -3
- 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 +0 -1
- data/docs/source/images/worst-performing-searches-on-results-customization-page.png +0 -0
- data/docs/source/images/writing-data.svg +0 -1
- data/docs/source/index.html.erb +0 -166
- data/docs/source/javascripts/jquery.js +0 -2
- data/docs/source/javascripts/lunr.js +0 -7
- data/docs/source/javascripts/site.js +0 -299
- data/docs/source/javascripts/vendor/highlight.pack.js +0 -2
- data/docs/source/layouts/article.erb +0 -106
- data/docs/source/layouts/bare.erb +0 -46
- data/docs/source/layouts/layout.erb +0 -43
- data/docs/source/release-notes/workarea-3-0-0.html.md +0 -146
- data/docs/source/release-notes/workarea-3-0-1.html.md +0 -161
- data/docs/source/release-notes/workarea-3-0-10.html.md +0 -39
- data/docs/source/release-notes/workarea-3-0-11.html.md +0 -277
- data/docs/source/release-notes/workarea-3-0-12.html.md +0 -14
- data/docs/source/release-notes/workarea-3-0-13.html.md +0 -153
- data/docs/source/release-notes/workarea-3-0-14.html.md +0 -93
- data/docs/source/release-notes/workarea-3-0-15.html.md +0 -107
- data/docs/source/release-notes/workarea-3-0-16.html.md +0 -36
- data/docs/source/release-notes/workarea-3-0-17.html.md +0 -141
- data/docs/source/release-notes/workarea-3-0-18.html.md +0 -123
- data/docs/source/release-notes/workarea-3-0-19.html.md +0 -160
- data/docs/source/release-notes/workarea-3-0-2.html.md +0 -222
- data/docs/source/release-notes/workarea-3-0-20.html.md +0 -95
- data/docs/source/release-notes/workarea-3-0-21.html.md +0 -168
- data/docs/source/release-notes/workarea-3-0-22.html.md +0 -268
- data/docs/source/release-notes/workarea-3-0-23.html.md +0 -173
- data/docs/source/release-notes/workarea-3-0-24.html.md +0 -19
- data/docs/source/release-notes/workarea-3-0-25.html.md +0 -26
- data/docs/source/release-notes/workarea-3-0-26.html.md +0 -199
- data/docs/source/release-notes/workarea-3-0-27.html.md +0 -113
- data/docs/source/release-notes/workarea-3-0-28.html.md +0 -39
- data/docs/source/release-notes/workarea-3-0-29.html.md +0 -73
- data/docs/source/release-notes/workarea-3-0-3.html.md +0 -35
- data/docs/source/release-notes/workarea-3-0-30.html.md +0 -186
- data/docs/source/release-notes/workarea-3-0-31.html.md +0 -125
- data/docs/source/release-notes/workarea-3-0-32.html.md +0 -73
- data/docs/source/release-notes/workarea-3-0-33.html.md +0 -137
- data/docs/source/release-notes/workarea-3-0-34.html.md +0 -203
- data/docs/source/release-notes/workarea-3-0-35.html.md +0 -205
- data/docs/source/release-notes/workarea-3-0-36.html.md +0 -105
- data/docs/source/release-notes/workarea-3-0-37.html.md +0 -144
- data/docs/source/release-notes/workarea-3-0-38.html.md +0 -73
- data/docs/source/release-notes/workarea-3-0-39.html.md +0 -77
- data/docs/source/release-notes/workarea-3-0-4.html.md +0 -14
- data/docs/source/release-notes/workarea-3-0-40.html.md +0 -130
- data/docs/source/release-notes/workarea-3-0-41.html.md +0 -70
- data/docs/source/release-notes/workarea-3-0-42.html.md +0 -52
- data/docs/source/release-notes/workarea-3-0-43.html.md +0 -72
- data/docs/source/release-notes/workarea-3-0-44.html.md +0 -93
- data/docs/source/release-notes/workarea-3-0-45.html.md +0 -61
- data/docs/source/release-notes/workarea-3-0-46.html.md +0 -171
- data/docs/source/release-notes/workarea-3-0-47.html.md +0 -130
- data/docs/source/release-notes/workarea-3-0-48.html.md +0 -160
- data/docs/source/release-notes/workarea-3-0-49.html.md +0 -28
- data/docs/source/release-notes/workarea-3-0-5.html.md +0 -225
- data/docs/source/release-notes/workarea-3-0-50.html.md +0 -74
- data/docs/source/release-notes/workarea-3-0-51.html.md +0 -61
- data/docs/source/release-notes/workarea-3-0-52.html.md +0 -76
- data/docs/source/release-notes/workarea-3-0-53.html.md +0 -126
- data/docs/source/release-notes/workarea-3-0-54.html.md +0 -112
- data/docs/source/release-notes/workarea-3-0-55.html.md +0 -105
- data/docs/source/release-notes/workarea-3-0-56.html.md +0 -56
- data/docs/source/release-notes/workarea-3-0-57.html.md +0 -82
- data/docs/source/release-notes/workarea-3-0-58.html.md +0 -153
- data/docs/source/release-notes/workarea-3-0-59.html.md +0 -78
- data/docs/source/release-notes/workarea-3-0-6.html.md +0 -165
- data/docs/source/release-notes/workarea-3-0-60.html.md +0 -43
- data/docs/source/release-notes/workarea-3-0-61.html.md +0 -46
- data/docs/source/release-notes/workarea-3-0-62.html.md +0 -23
- data/docs/source/release-notes/workarea-3-0-63.html.md +0 -25
- data/docs/source/release-notes/workarea-3-0-64.html.md +0 -25
- data/docs/source/release-notes/workarea-3-0-65.html.md +0 -37
- data/docs/source/release-notes/workarea-3-0-7.html.md +0 -207
- data/docs/source/release-notes/workarea-3-0-8.html.md +0 -337
- data/docs/source/release-notes/workarea-3-0-9.html.md +0 -196
- data/docs/source/release-notes/workarea-3-1-0.html.md +0 -414
- data/docs/source/release-notes/workarea-3-1-1.html.md +0 -139
- data/docs/source/release-notes/workarea-3-1-10.html.md +0 -19
- data/docs/source/release-notes/workarea-3-1-11.html.md +0 -27
- data/docs/source/release-notes/workarea-3-1-12.html.md +0 -216
- data/docs/source/release-notes/workarea-3-1-13.html.md +0 -113
- data/docs/source/release-notes/workarea-3-1-14.html.md +0 -39
- data/docs/source/release-notes/workarea-3-1-15.html.md +0 -107
- data/docs/source/release-notes/workarea-3-1-16.html.md +0 -188
- data/docs/source/release-notes/workarea-3-1-17.html.md +0 -141
- data/docs/source/release-notes/workarea-3-1-18.html.md +0 -73
- data/docs/source/release-notes/workarea-3-1-19.html.md +0 -137
- data/docs/source/release-notes/workarea-3-1-2.html.md +0 -55
- data/docs/source/release-notes/workarea-3-1-20.html.md +0 -203
- data/docs/source/release-notes/workarea-3-1-21.html.md +0 -205
- data/docs/source/release-notes/workarea-3-1-22.html.md +0 -121
- data/docs/source/release-notes/workarea-3-1-23.html.md +0 -144
- data/docs/source/release-notes/workarea-3-1-24.html.md +0 -94
- data/docs/source/release-notes/workarea-3-1-25.html.md +0 -77
- data/docs/source/release-notes/workarea-3-1-26.html.md +0 -130
- data/docs/source/release-notes/workarea-3-1-27.html.md +0 -70
- data/docs/source/release-notes/workarea-3-1-28.html.md +0 -52
- data/docs/source/release-notes/workarea-3-1-29.html.md +0 -44
- data/docs/source/release-notes/workarea-3-1-3.html.md +0 -185
- data/docs/source/release-notes/workarea-3-1-30.html.md +0 -72
- data/docs/source/release-notes/workarea-3-1-31.html.md +0 -93
- data/docs/source/release-notes/workarea-3-1-32.html.md +0 -61
- data/docs/source/release-notes/workarea-3-1-33.html.md +0 -171
- data/docs/source/release-notes/workarea-3-1-34.html.md +0 -130
- data/docs/source/release-notes/workarea-3-1-35.html.md +0 -179
- data/docs/source/release-notes/workarea-3-1-36.html.md +0 -28
- data/docs/source/release-notes/workarea-3-1-37.html.md +0 -74
- data/docs/source/release-notes/workarea-3-1-38.html.md +0 -61
- data/docs/source/release-notes/workarea-3-1-39.html.md +0 -96
- data/docs/source/release-notes/workarea-3-1-4.html.md +0 -148
- data/docs/source/release-notes/workarea-3-1-40.html.md +0 -126
- data/docs/source/release-notes/workarea-3-1-41.html.md +0 -128
- data/docs/source/release-notes/workarea-3-1-42.html.md +0 -105
- data/docs/source/release-notes/workarea-3-1-43.html.md +0 -37
- data/docs/source/release-notes/workarea-3-1-44.html.md +0 -82
- data/docs/source/release-notes/workarea-3-1-45.html.md +0 -153
- data/docs/source/release-notes/workarea-3-1-46.html.md +0 -91
- data/docs/source/release-notes/workarea-3-1-47.html.md +0 -65
- data/docs/source/release-notes/workarea-3-1-48.html.md +0 -46
- data/docs/source/release-notes/workarea-3-1-49.html.md +0 -23
- data/docs/source/release-notes/workarea-3-1-5.html.md +0 -169
- data/docs/source/release-notes/workarea-3-1-50.html.md +0 -42
- data/docs/source/release-notes/workarea-3-1-51.html.md +0 -25
- data/docs/source/release-notes/workarea-3-1-52.html.md +0 -57
- data/docs/source/release-notes/workarea-3-1-6.html.md +0 -117
- data/docs/source/release-notes/workarea-3-1-7.html.md +0 -176
- data/docs/source/release-notes/workarea-3-1-8.html.md +0 -283
- data/docs/source/release-notes/workarea-3-1-9.html.md +0 -212
- data/docs/source/release-notes/workarea-3-2-0.html.md +0 -1705
- data/docs/source/release-notes/workarea-3-2-1.html.md +0 -216
- data/docs/source/release-notes/workarea-3-2-10.html.md +0 -237
- data/docs/source/release-notes/workarea-3-2-11.html.md +0 -121
- data/docs/source/release-notes/workarea-3-2-12.html.md +0 -145
- data/docs/source/release-notes/workarea-3-2-13.html.md +0 -138
- data/docs/source/release-notes/workarea-3-2-14.html.md +0 -77
- data/docs/source/release-notes/workarea-3-2-15.html.md +0 -130
- data/docs/source/release-notes/workarea-3-2-16.html.md +0 -111
- data/docs/source/release-notes/workarea-3-2-17.html.md +0 -52
- data/docs/source/release-notes/workarea-3-2-18.html.md +0 -44
- data/docs/source/release-notes/workarea-3-2-19.html.md +0 -72
- data/docs/source/release-notes/workarea-3-2-2.html.md +0 -145
- data/docs/source/release-notes/workarea-3-2-20.html.md +0 -93
- data/docs/source/release-notes/workarea-3-2-21.html.md +0 -61
- data/docs/source/release-notes/workarea-3-2-22.html.md +0 -154
- data/docs/source/release-notes/workarea-3-2-23.html.md +0 -130
- data/docs/source/release-notes/workarea-3-2-24.html.md +0 -200
- data/docs/source/release-notes/workarea-3-2-25.html.md +0 -28
- data/docs/source/release-notes/workarea-3-2-26.html.md +0 -94
- data/docs/source/release-notes/workarea-3-2-27.html.md +0 -61
- data/docs/source/release-notes/workarea-3-2-28.html.md +0 -96
- data/docs/source/release-notes/workarea-3-2-29.html.md +0 -126
- data/docs/source/release-notes/workarea-3-2-30.html.md +0 -112
- data/docs/source/release-notes/workarea-3-2-31.html.md +0 -105
- data/docs/source/release-notes/workarea-3-2-32.html.md +0 -56
- data/docs/source/release-notes/workarea-3-2-33.html.md +0 -82
- data/docs/source/release-notes/workarea-3-2-34.html.md +0 -153
- data/docs/source/release-notes/workarea-3-2-35.html.md +0 -91
- data/docs/source/release-notes/workarea-3-2-36.html.md +0 -118
- data/docs/source/release-notes/workarea-3-2-37.html.md +0 -46
- data/docs/source/release-notes/workarea-3-2-38.html.md +0 -23
- data/docs/source/release-notes/workarea-3-2-39.html.md +0 -42
- data/docs/source/release-notes/workarea-3-2-4.html.md +0 -109
- data/docs/source/release-notes/workarea-3-2-40.html.md +0 -25
- data/docs/source/release-notes/workarea-3-2-41.html.md +0 -90
- data/docs/source/release-notes/workarea-3-2-5.html.md +0 -186
- data/docs/source/release-notes/workarea-3-2-6.html.md +0 -173
- data/docs/source/release-notes/workarea-3-2-7.html.md +0 -89
- data/docs/source/release-notes/workarea-3-2-8.html.md +0 -137
- data/docs/source/release-notes/workarea-3-2-9.html.md +0 -219
- data/docs/source/release-notes/workarea-3-3-0.html.md +0 -1272
- data/docs/source/release-notes/workarea-3-3-1.html.md +0 -324
- data/docs/source/release-notes/workarea-3-3-10.html.md +0 -69
- data/docs/source/release-notes/workarea-3-3-11.html.md +0 -72
- data/docs/source/release-notes/workarea-3-3-12.html.md +0 -136
- data/docs/source/release-notes/workarea-3-3-13.html.md +0 -61
- data/docs/source/release-notes/workarea-3-3-14.html.md +0 -196
- data/docs/source/release-notes/workarea-3-3-15.html.md +0 -167
- data/docs/source/release-notes/workarea-3-3-16.html.md +0 -234
- data/docs/source/release-notes/workarea-3-3-17.html.md +0 -82
- data/docs/source/release-notes/workarea-3-3-18.html.md +0 -165
- data/docs/source/release-notes/workarea-3-3-19.html.md +0 -106
- data/docs/source/release-notes/workarea-3-3-2.html.md +0 -72
- data/docs/source/release-notes/workarea-3-3-20.html.md +0 -116
- data/docs/source/release-notes/workarea-3-3-21.html.md +0 -228
- data/docs/source/release-notes/workarea-3-3-22.html.md +0 -125
- data/docs/source/release-notes/workarea-3-3-23.html.md +0 -154
- data/docs/source/release-notes/workarea-3-3-24.html.md +0 -70
- data/docs/source/release-notes/workarea-3-3-25.html.md +0 -114
- data/docs/source/release-notes/workarea-3-3-26.html.md +0 -260
- data/docs/source/release-notes/workarea-3-3-27.html.md +0 -138
- data/docs/source/release-notes/workarea-3-3-28.html.md +0 -147
- data/docs/source/release-notes/workarea-3-3-29.html.md +0 -63
- data/docs/source/release-notes/workarea-3-3-3.html.md +0 -153
- data/docs/source/release-notes/workarea-3-3-30.html.md +0 -102
- data/docs/source/release-notes/workarea-3-3-31.html.md +0 -57
- data/docs/source/release-notes/workarea-3-3-32.html.md +0 -44
- data/docs/source/release-notes/workarea-3-3-33.html.md +0 -114
- data/docs/source/release-notes/workarea-3-3-34.html.md +0 -29
- data/docs/source/release-notes/workarea-3-3-4.html.md +0 -332
- data/docs/source/release-notes/workarea-3-3-5.html.md +0 -242
- data/docs/source/release-notes/workarea-3-3-6.html.md +0 -100
- data/docs/source/release-notes/workarea-3-3-7.html.md +0 -148
- data/docs/source/release-notes/workarea-3-3-8.html.md +0 -163
- data/docs/source/release-notes/workarea-3-3-9.html.md +0 -93
- data/docs/source/release-notes/workarea-3-4-0.html.md +0 -580
- data/docs/source/release-notes/workarea-3-4-1.html.md +0 -150
- data/docs/source/release-notes/workarea-3-4-10.html.md +0 -72
- data/docs/source/release-notes/workarea-3-4-11.html.md +0 -60
- data/docs/source/release-notes/workarea-3-4-12.html.md +0 -155
- data/docs/source/release-notes/workarea-3-4-15.html.md +0 -100
- data/docs/source/release-notes/workarea-3-4-16.html.md +0 -88
- data/docs/source/release-notes/workarea-3-4-2.html.md +0 -188
- data/docs/source/release-notes/workarea-3-4-3.html.md +0 -136
- data/docs/source/release-notes/workarea-3-4-4.html.md +0 -114
- data/docs/source/release-notes/workarea-3-4-5.html.md +0 -275
- data/docs/source/release-notes/workarea-3-4-6.html.md +0 -169
- data/docs/source/release-notes/workarea-3-4-7.html.md +0 -162
- data/docs/source/release-notes/workarea-3-4-8.html.md +0 -95
- data/docs/source/release-notes/workarea-3-4-9.html.md +0 -135
- data/docs/source/release-notes.html.md +0 -261
- data/docs/source/search.html.erb +0 -34
- data/docs/source/shared/_header.erb +0 -61
- data/docs/source/shared/_svgs.erb +0 -17
- data/docs/source/style_guide/index.html.erb +0 -382
- data/docs/source/stylesheets/_base.scss +0 -125
- data/docs/source/stylesheets/_components.scss +0 -669
- data/docs/source/stylesheets/_helpers.scss +0 -10
- data/docs/source/stylesheets/_opinions.scss +0 -42
- data/docs/source/stylesheets/_settings.scss +0 -56
- data/docs/source/stylesheets/_typography.scss +0 -119
- data/docs/source/stylesheets/site.css.scss +0 -14
- data/docs/source/stylesheets/vendor/_avalanche.scss +0 -328
- data/docs/source/stylesheets/vendor/_normalize.scss +0 -341
- data/docs/source/stylesheets/vendor/highlight/_tomorrow_night_blue.scss +0 -75
- data/docs/source/upgrade-guides/workarea-3-4-0.html.md +0 -152
- data/docs/source/upgrade-guides.html.md +0 -18
- data/docs/workarea_renderer.rb +0 -8
- data/docs/yarn.lock +0 -2522
@@ -1,546 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Order Life Cycle
|
3
|
-
excerpt: 'Order models represent order transactions throughout their entire life cycles, thereby encapsulating the function of several traditional business documents (for example: purchase order, invoice, and receipt) into a single document.'
|
4
|
-
---
|
5
|
-
|
6
|
-
# Order Life Cycle
|
7
|
-
|
8
|
-
`Order` models represent [order transactions](orders.html) throughout their entire life cycles, thereby encapsulating the function of several traditional business documents (for example: purchase order, invoice, and receipt) into a single document.
|
9
|
-
|
10
|
-
Orders begin their lives driven largely by consumers. Consumers create carts, which ideally progress through checkout, but may become abandoned along the way. If not placed, orders eventually expire and are cleaned. In an effort to prevent this, abandoned orders trigger reminders to consumers, which may result in resumed carts and checkouts.
|
11
|
-
|
12
|
-
Completed checkouts result in placed orders, which unlike carts, are handled primarily by the retailer. Placed orders are indexed into search, through which admins access and manage the orders. Placed orders are permanent records that never become abandoned or expire, even when they are canceled.
|
13
|
-
|
14
|
-
This guide describes the preceding domain concepts in greater detail, providing as examples all the configurable values and aspects of the `Order` interface that effectively define this domain logic and affect the progression of an order through it’s various statuses and states.
|
15
|
-
|
16
|
-
Copious examples use the Ruby interface provided by Workarea Core. Each example builds on those before it, as if run sequentially within the same Ruby process.
|
17
|
-
|
18
|
-
## Carts
|
19
|
-
|
20
|
-
Orders begin as <dfn>carts</dfn>, typically created by consumers in the Storefront. The cart status is the default state of an order, generally defined as “not in any other status”.
|
21
|
-
|
22
|
-
```
|
23
|
-
order = Workarea::Order.create
|
24
|
-
|
25
|
-
order.status
|
26
|
-
# => :cart
|
27
|
-
```
|
28
|
-
|
29
|
-
Carts, like other [application documents](application-document.html), have timestamps which encode the date and time at which they were created and last updated. Later examples show uses of these timestamps.
|
30
|
-
|
31
|
-
```
|
32
|
-
order.created_at.present?
|
33
|
-
# => true
|
34
|
-
|
35
|
-
order.updated_at.present?
|
36
|
-
# => true
|
37
|
-
```
|
38
|
-
|
39
|
-
In a broader sense, carts include all orders that aren’t placed, as demonstrated in the following examples:
|
40
|
-
|
41
|
-
```
|
42
|
-
Workarea::Order.carts.include?(order)
|
43
|
-
# => true
|
44
|
-
|
45
|
-
order.placed_at.present?
|
46
|
-
# => false
|
47
|
-
|
48
|
-
order.placed?
|
49
|
-
# => false
|
50
|
-
|
51
|
-
Workarea::Order.not_placed.include?(order)
|
52
|
-
# => true
|
53
|
-
```
|
54
|
-
|
55
|
-
## Abandoned Carts
|
56
|
-
|
57
|
-
Orders not placed within the configurable `order_active_period` are considered <dfn>abandoned</dfn>. The order created above is not abandoned because its `created_at` is still within the order active period.
|
58
|
-
|
59
|
-
```
|
60
|
-
Workarea.config.order_active_period
|
61
|
-
# => 2 hours
|
62
|
-
|
63
|
-
order.abandoned?
|
64
|
-
# => false
|
65
|
-
|
66
|
-
order.created_at > Workarea.config.order_active_period.ago
|
67
|
-
# => true
|
68
|
-
```
|
69
|
-
|
70
|
-
The following example uses Rails’ [testing time helpers](http://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/TimeHelpers.html) to simulate the passage of time, demonstrating the effect on the order’s status. After the active period has passed, the order identifies as abandoned.
|
71
|
-
|
72
|
-
```
|
73
|
-
include ActiveSupport::Testing::TimeHelpers
|
74
|
-
|
75
|
-
travel Workarea.config.order_active_period
|
76
|
-
|
77
|
-
order.created_at > Workarea.config.order_active_period.ago
|
78
|
-
# => false
|
79
|
-
|
80
|
-
order.abandoned?
|
81
|
-
# => true
|
82
|
-
|
83
|
-
order.status
|
84
|
-
# => :abandoned
|
85
|
-
```
|
86
|
-
|
87
|
-
### Order Expiration
|
88
|
-
|
89
|
-
Furthermore, orders that go unmodified within the configurable `order_expiration_period` are considered <dfn>expired</dfn>. The following example queries for expired orders before and after the expiration period has elapsed.
|
90
|
-
|
91
|
-
```
|
92
|
-
Workarea.config.order_expiration_period
|
93
|
-
# => 6 months
|
94
|
-
|
95
|
-
Workarea::Order.expired.include?(order)
|
96
|
-
# => false
|
97
|
-
|
98
|
-
order.updated_at > Workarea.config.order_expiration_period.ago
|
99
|
-
# => true
|
100
|
-
|
101
|
-
travel Workarea.config.order_expiration_period
|
102
|
-
|
103
|
-
order.updated_at > Workarea.config.order_expiration_period.ago
|
104
|
-
# => false
|
105
|
-
|
106
|
-
Workarea::Order.expired.include?(order)
|
107
|
-
# => true
|
108
|
-
```
|
109
|
-
|
110
|
-
### Cleaning Orders
|
111
|
-
|
112
|
-
Workarea applications run a [scheduled worker](workers.html#sidekiq-cron-job) to periodically clean up (that is, destroy) expired orders. Manually running this worker removes the order from the database.
|
113
|
-
|
114
|
-
```
|
115
|
-
Workarea::CleanOrders.new.perform
|
116
|
-
|
117
|
-
Workarea::Order.expired.include?(order)
|
118
|
-
# => false
|
119
|
-
|
120
|
-
Workarea::Order.all.include?(order)
|
121
|
-
# => false
|
122
|
-
```
|
123
|
-
|
124
|
-
## Checkouts
|
125
|
-
|
126
|
-
<dfn>Checkouts</dfn> are carts in the process of checking out. Checkout is the process used to transition an order from a cart to a placed order. The following examples require a new order
|
127
|
-
|
128
|
-
```
|
129
|
-
order = Workarea::Order.create
|
130
|
-
```
|
131
|
-
|
132
|
-
which embeds an item. This example assumes catalog data is already seeded. Beware: the following procedure for adding an item is suitable for demonstration but not suitable for production use. <sup><a href="#notes" id="note-1-context">[1]</a></sup>
|
133
|
-
|
134
|
-
```
|
135
|
-
product = Workarea::Catalog::Product.sample
|
136
|
-
|
137
|
-
order.add_item(
|
138
|
-
product_id: product.id,
|
139
|
-
sku: product.variants.first.sku,
|
140
|
-
quantity: 1
|
141
|
-
)
|
142
|
-
```
|
143
|
-
|
144
|
-
Creating and starting a checkout writes a new timestamp to the order, recording the time checkout was started. The presence of this timestamp causes the order to identify as a checkout.
|
145
|
-
|
146
|
-
```
|
147
|
-
checkout = Workarea::Checkout.new(order)
|
148
|
-
|
149
|
-
checkout.start_as(:guest)
|
150
|
-
|
151
|
-
order.checkout_started_at.present?
|
152
|
-
# => true
|
153
|
-
|
154
|
-
order.started_checkout?
|
155
|
-
# => true
|
156
|
-
|
157
|
-
order.checking_out?
|
158
|
-
# => true
|
159
|
-
|
160
|
-
order.status
|
161
|
-
# => :checkout
|
162
|
-
```
|
163
|
-
|
164
|
-
However, because the order is not yet placed, it also identifies as a cart.
|
165
|
-
|
166
|
-
```
|
167
|
-
Workarea::Order.carts.include?(order)
|
168
|
-
# => true
|
169
|
-
|
170
|
-
Workarea::Order.not_placed.include?(order)
|
171
|
-
# => true
|
172
|
-
```
|
173
|
-
|
174
|
-
### Checkout Expiration
|
175
|
-
|
176
|
-
If a checkout idles beyond the configurable duration, `checkout_expiration`, the checkout expires. In this case, the order is returned to the cart status, and the consumer must restart checkout.
|
177
|
-
|
178
|
-
```
|
179
|
-
Workarea.config.checkout_expiration
|
180
|
-
# => 15 minutes
|
181
|
-
|
182
|
-
order.checkout_started_at > Workarea.config.checkout_expiration.ago
|
183
|
-
# => true
|
184
|
-
|
185
|
-
order.status
|
186
|
-
# => :checkout
|
187
|
-
|
188
|
-
travel Workarea.config.checkout_expiration
|
189
|
-
|
190
|
-
order.checkout_started_at > Workarea.config.checkout_expiration.ago
|
191
|
-
# => false
|
192
|
-
|
193
|
-
order.checking_out?
|
194
|
-
# => false
|
195
|
-
|
196
|
-
order.status
|
197
|
-
# => :cart
|
198
|
-
```
|
199
|
-
|
200
|
-
This does not mean the consumer must complete the entire checkout within this period, since each Storefront checkout request <dfn>touches</dfn> the checkout, updating the checkout start time (along with some other details). This prevents the checkout from expiring and will also “revive” an expired checkout, returning it to active checkout status.
|
201
|
-
|
202
|
-
```
|
203
|
-
order.touch_checkout!
|
204
|
-
|
205
|
-
order.checkout_started_at > Workarea.config.checkout_expiration.ago
|
206
|
-
# => true
|
207
|
-
|
208
|
-
order.checking_out?
|
209
|
-
# => true
|
210
|
-
|
211
|
-
order.status
|
212
|
-
# => :checkout
|
213
|
-
```
|
214
|
-
|
215
|
-
## Abandoned Checkouts
|
216
|
-
|
217
|
-
As with all carts, a checkout that is not placed within the order active period is considered abandoned. Traveling forward this duration expires the checkout and causes the order to become abandoned.
|
218
|
-
|
219
|
-
```
|
220
|
-
travel Workarea.config.order_active_period
|
221
|
-
|
222
|
-
order.checkout?
|
223
|
-
# => false
|
224
|
-
|
225
|
-
order.abandoned?
|
226
|
-
# => true
|
227
|
-
|
228
|
-
order.status
|
229
|
-
# => :abandoned
|
230
|
-
```
|
231
|
-
|
232
|
-
However, while the order is actively checking out, it will not identify as abandoned, despite it existing longer than the order active period.
|
233
|
-
|
234
|
-
```
|
235
|
-
order.touch_checkout!
|
236
|
-
|
237
|
-
order.checking_out?
|
238
|
-
# => true
|
239
|
-
|
240
|
-
order.abandoned?
|
241
|
-
# => false
|
242
|
-
```
|
243
|
-
|
244
|
-
After the checkout expires, the order returns to abandoned status.
|
245
|
-
|
246
|
-
```
|
247
|
-
travel Workarea.config.checkout_expiration
|
248
|
-
|
249
|
-
order.checking_out?
|
250
|
-
# => false
|
251
|
-
|
252
|
-
order.abandoned?
|
253
|
-
# => true
|
254
|
-
|
255
|
-
order.status
|
256
|
-
# => :abandoned
|
257
|
-
```
|
258
|
-
|
259
|
-
### Order Reminding
|
260
|
-
|
261
|
-
To help recover the potentially lost revenue of abandoned orders, Workarea applications send “reminder” emails when possible. Each email contains a token allowing the consumer to resume the cart. <sup><a href="#notes" id="note-2-context">[2]</a></sup>
|
262
|
-
|
263
|
-
For an order to be considered <dfn>needs reminding</dfn>, it must have started checkout, become abandoned, and have an email. The example order does not qualify because it is an active checkout and does not have an email.
|
264
|
-
|
265
|
-
```
|
266
|
-
order.checking_out?
|
267
|
-
# => true
|
268
|
-
|
269
|
-
order.email.present?
|
270
|
-
# => false
|
271
|
-
|
272
|
-
Workarea::Order.need_reminding.include?(order)
|
273
|
-
# => false
|
274
|
-
```
|
275
|
-
|
276
|
-
Expiring the checkout (by simulating the passage of time) and adding an email causes the order to match.
|
277
|
-
|
278
|
-
```
|
279
|
-
travel Workarea.config.checkout_expiration
|
280
|
-
|
281
|
-
order.update_attributes(email: 'bobbyclams@workarea.com')
|
282
|
-
|
283
|
-
Workarea::Order.need_reminding.include?(order)
|
284
|
-
# => true
|
285
|
-
```
|
286
|
-
|
287
|
-
A scheduled worker runs this query periodically and sends a reminder email for each matching order. Each order is “marked as reminded” with a `reminded_at` timestamp, which prevents the order from matching the query again.
|
288
|
-
|
289
|
-
```
|
290
|
-
Workarea::OrderReminder.new.perform
|
291
|
-
|
292
|
-
order.mark_as_reminded!
|
293
|
-
|
294
|
-
order.reminded_at.present?
|
295
|
-
# => true
|
296
|
-
|
297
|
-
Workarea::Order.need_reminding.include?(order)
|
298
|
-
# => false
|
299
|
-
```
|
300
|
-
|
301
|
-
### Order Expiration After Starting Checkout
|
302
|
-
|
303
|
-
If the reminder email does not entice the consumer to resume the cart, the order will likely expire and be cleaned. Notice in the following example the order is returned only by `Order.expired_in_checkout`, which was added in Workarea 3.3 to address the issue of orders never expiring after starting checkout. <sup><a href="#notes" id="note-3-context">[3]</a></sup>
|
304
|
-
|
305
|
-
```
|
306
|
-
travel Workarea.config.order_expiration_period
|
307
|
-
|
308
|
-
order.updated_at <= Workarea.config.order_expiration_period.ago
|
309
|
-
# => true
|
310
|
-
|
311
|
-
order.started_checkout?
|
312
|
-
# => true
|
313
|
-
|
314
|
-
Workarea::Order.expired.include?(order)
|
315
|
-
# => false
|
316
|
-
|
317
|
-
Workarea::Order.expired_in_checkout.include?(order)
|
318
|
-
# => true
|
319
|
-
```
|
320
|
-
|
321
|
-
### Resetting Checkout
|
322
|
-
|
323
|
-
One final note regarding checkout: it is possible to explicitly <dfn>reset</dfn> a checkout, which returns the order to the cart status and removes any record of checkout having started.
|
324
|
-
|
325
|
-
```
|
326
|
-
order.reset_checkout!
|
327
|
-
|
328
|
-
order.checkout_started_at.present?
|
329
|
-
# => false
|
330
|
-
|
331
|
-
order.started_checkout?
|
332
|
-
# => false
|
333
|
-
```
|
334
|
-
|
335
|
-
Now the order will _not_ be reminded since it has no record of starting checkout.
|
336
|
-
|
337
|
-
```
|
338
|
-
Workarea::Order.need_reminding.include?(order)
|
339
|
-
# => false
|
340
|
-
```
|
341
|
-
|
342
|
-
Resetting checkout also removes the `reminded_at` timestamp, so the order will qualify as _needs reminding_ if checkout if resumed.
|
343
|
-
|
344
|
-
```
|
345
|
-
order.reminded_at.present?
|
346
|
-
# => false
|
347
|
-
|
348
|
-
order.touch_checkout!
|
349
|
-
|
350
|
-
travel Workarea.config.order_active_period
|
351
|
-
|
352
|
-
Workarea::Order.need_reminding.include?(order)
|
353
|
-
# => true
|
354
|
-
```
|
355
|
-
|
356
|
-
## Placed Orders
|
357
|
-
|
358
|
-
Checkout concludes by <dfn>placing</dfn> the order. Always place an order through checkout, not directly from the order. This ensures the completion of each checkout step, manages inventory, creates the corresponding `Fulfillment`, and saves order analytics.
|
359
|
-
|
360
|
-
However, placing the example order through checkout fails because the checkout steps are incomplete. To continue demonstrating the placed order status without distraction, the following example places the order directly from the order model.
|
361
|
-
|
362
|
-
```
|
363
|
-
checkout.place_order
|
364
|
-
# => false
|
365
|
-
|
366
|
-
order.place
|
367
|
-
# => true
|
368
|
-
```
|
369
|
-
|
370
|
-
The `place` method does little more than set the `placed_at` timestamp and save the order. However, it saves the order conservatively, waiting for the save to write to disk and (in hosted environments) replicate to other nodes before reporting success. <sup><a href="#notes" id="note-4-context">[4]</a></sup>
|
371
|
-
|
372
|
-
```
|
373
|
-
order.placed_at.present?
|
374
|
-
# => true
|
375
|
-
```
|
376
|
-
|
377
|
-
This addition causes the order to identify as placed.
|
378
|
-
|
379
|
-
```
|
380
|
-
order.placed?
|
381
|
-
# => true
|
382
|
-
|
383
|
-
order.status
|
384
|
-
# => :placed
|
385
|
-
|
386
|
-
Workarea::Order.placed.include?(order)
|
387
|
-
# => true
|
388
|
-
|
389
|
-
Workarea::Order.recent_placed.include?(order)
|
390
|
-
# => true
|
391
|
-
```
|
392
|
-
|
393
|
-
Moreover, the order no longer identifies as a cart, since the cart and placed statuses are exclusive.
|
394
|
-
|
395
|
-
```
|
396
|
-
Workarea::Order.carts.include?(order)
|
397
|
-
# => false
|
398
|
-
|
399
|
-
Workarea::Order.not_placed.include?(order)
|
400
|
-
# => false
|
401
|
-
```
|
402
|
-
|
403
|
-
As a placed order, the order can no longer be abandoned or expire.
|
404
|
-
|
405
|
-
```
|
406
|
-
travel Workarea.config.order_expiration_period
|
407
|
-
|
408
|
-
order.status
|
409
|
-
# => :placed
|
410
|
-
|
411
|
-
order.abandoned?
|
412
|
-
# => false
|
413
|
-
|
414
|
-
Workarea::Order.expired.include?(order)
|
415
|
-
# => false
|
416
|
-
```
|
417
|
-
|
418
|
-
### Creating Placed Orders with Factories
|
419
|
-
|
420
|
-
Setting up the necessary data to complete an order properly through checkout is cumbersome (hence, the process was skipped above). However, in a testing context, factories make it easier to create orders, including placed orders.
|
421
|
-
|
422
|
-
Requiring the application’s test helper and including the factories module enables factories in the current Ruby process (this isn’t necessary when writing code within a test case).
|
423
|
-
|
424
|
-
```
|
425
|
-
# WARNING: drops the database for the current Rails environment!
|
426
|
-
require_relative 'test/test_helper'
|
427
|
-
|
428
|
-
include Workarea::Factories
|
429
|
-
|
430
|
-
cart = create_order
|
431
|
-
|
432
|
-
placed_order = create_placed_order
|
433
|
-
|
434
|
-
cart.status
|
435
|
-
# => :cart
|
436
|
-
|
437
|
-
placed_order.status
|
438
|
-
# => :placed
|
439
|
-
```
|
440
|
-
|
441
|
-
You can also use `complete_checkout` to place an order you've already created. The existing order must have an email and at least one item. The factory creates the shipping and payment data needed to complete checkout, and places the order.
|
442
|
-
|
443
|
-
```
|
444
|
-
order = create_order
|
445
|
-
|
446
|
-
order.status
|
447
|
-
# => :cart
|
448
|
-
|
449
|
-
complete_checkout(order)
|
450
|
-
# => true
|
451
|
-
|
452
|
-
order.status
|
453
|
-
# => :placed
|
454
|
-
```
|
455
|
-
|
456
|
-
### Searching Placed Orders
|
457
|
-
|
458
|
-
Notably, search has been absent from this discussion so far. This is due to the fact that only _placed_ orders are indexed into Elasticsearch, in order for administrators to manage the placed orders through the Admin interface.
|
459
|
-
|
460
|
-
The next example first resets the Admin search indexes and then manually indexes the cart and placed order which were created above. Only the placed order is returned in search results.
|
461
|
-
|
462
|
-
```
|
463
|
-
cart = create_order
|
464
|
-
|
465
|
-
placed_order = create_placed_order
|
466
|
-
|
467
|
-
Workarea::Search::Admin.reset_indexes!
|
468
|
-
|
469
|
-
Workarea::Search::AdminOrders.new.results.count
|
470
|
-
# => 0
|
471
|
-
|
472
|
-
Workarea::IndexAdminSearch.perform(cart)
|
473
|
-
|
474
|
-
Workarea::IndexAdminSearch.perform(placed_order)
|
475
|
-
|
476
|
-
Workarea::Search::AdminOrders.new.results.count
|
477
|
-
# => 1
|
478
|
-
|
479
|
-
Workarea::Search::AdminOrders.new.results.first.id == placed_order.id
|
480
|
-
# => true
|
481
|
-
```
|
482
|
-
|
483
|
-
## Canceled Orders
|
484
|
-
|
485
|
-
Workarea Core also allows <dfn>canceling</dfn> orders, however, this does not take into consideration the restocking of inventory, refunding of payment, and updating of fulfillment that may accompany such a change. Because of these additional concerns, this functionality is not exposed as a web interface in the base platform, but is available through the <cite>Workarea OMS</cite> plugin.
|
486
|
-
|
487
|
-
From the `Order` document’s perspective, <dfn>canceling</dfn> an order (achieved through `Order#cancel`) is simply the process of recording the date and time at which the order was canceled. The presence of this additional timestamp causes the order to identify as canceled.
|
488
|
-
|
489
|
-
```
|
490
|
-
placed_order.cancel
|
491
|
-
# => true
|
492
|
-
|
493
|
-
placed_order.canceled_at.present?
|
494
|
-
# => true
|
495
|
-
|
496
|
-
placed_order.canceled?
|
497
|
-
# => true
|
498
|
-
|
499
|
-
placed_order.status
|
500
|
-
# => :canceled
|
501
|
-
```
|
502
|
-
|
503
|
-
A canceled order also continues to identify as a placed order and continues to be accessible through search.
|
504
|
-
|
505
|
-
```
|
506
|
-
placed_order.placed_at.present?
|
507
|
-
# => true
|
508
|
-
|
509
|
-
placed_order.placed?
|
510
|
-
# => true
|
511
|
-
|
512
|
-
Workarea::Order.placed.include?(placed_order)
|
513
|
-
# => true
|
514
|
-
|
515
|
-
Workarea::Order.recent_placed.include?(placed_order)
|
516
|
-
# => true
|
517
|
-
|
518
|
-
Workarea::Search::AdminOrders.new.results.first.id == placed_order.id
|
519
|
-
# => true
|
520
|
-
```
|
521
|
-
|
522
|
-
## Summary
|
523
|
-
|
524
|
-
- Consumers create carts in the Storefront, which may become abandoned and expire, and are eventually cleaned
|
525
|
-
- Carts progress through checkouts, which also expire and may become abandoned
|
526
|
-
- Abandoned orders are reported and (when possible) reminded, which may result in resumed carts and checkouts
|
527
|
-
- Completed checkouts produce placed orders, which are indexed into search for management by admins, and may be canceled
|
528
|
-
- These order statuses and states are defined largely by aspects of the `Order` interface, namely:
|
529
|
-
- The `status` instance method
|
530
|
-
- The destructive instance methods `touch_checkout!`, `reset_checkout!`, `mark_as_reminded!`, `place`, and `cancel`
|
531
|
-
- The timestamp fields `created_at`, `updated_at`, `checkout_started_at`, `reminded_at`, `placed_at`, and `canceled_at`
|
532
|
-
- The predicate methods `abandoned?`, `started_checkout?`, `checking_out?`, `placed?`, and `canceled?`
|
533
|
-
- The criteria class methods `.carts`, `.not_placed`, `.expired`, `.need_reminding`, `.placed`, and `.recent_placed`
|
534
|
-
As well as the configurable durations `Workarea.config.order_active_period`, `Workarea.config.order_expiration_period`, and `Workarea.config.checkout_expiration`
|
535
|
-
|
536
|
-
## Notes
|
537
|
-
|
538
|
-
[1] The forthcoming <cite>Managing Carts</cite> guide will provide a more robust recipe for adding an item to an order.
|
539
|
-
|
540
|
-
[2] The reminder email and the endpoint for resuming a cart are Storefront concerns and will be described in the <cite>Managing Carts</cite> guide.
|
541
|
-
|
542
|
-
[3] In Workarea versions prior to 3.3, this order will never expire unless checkout is explicitly reset, and the order is therefore never cleaned.
|
543
|
-
|
544
|
-
[4] The `Order#place` method also runs the custom `:place` callback (see [Callbacks Worker](workers.html#callbacks-worker), which enqueues additional work to run in the background. However, those jobs are outside the scope of the `Order` module and are not covered here.
|
545
|
-
|
546
|
-
|