Patch release notes for Workarea 3.3.12.
Downgrade I18n::JS To Prevent Faker Translations From Loading
Downgrade i18n-js to v3.0.10 to prevent issue with loading Faker translations in the storefront. This was fixed when v3.0.0 was released, but broke due to a change in the i18n-js private method API.
Convert Attribute Case in Customizations Subclasses
Attribute keys passed into a subclass of
typically convert to
snake_case so they can be read as methods on the
object. This breaks down when
camelCased attribute names are
String#underscore seems to not handle case changes
in the word, because instead of "foo_bar" from "fooBar", "foobar" is what
the attribute key looks like. Call
#titleize on the attribute name before
setting it as an instance variable, this will take both spaces and case
changes into account and treat them as separators of the word.
Always Select Option With One Selection in Option Set Templates
option_thumbnails templates, options with
only one selection available are now selected by default, avoiding an
additional unnecessary click in order to add the product to cart.
Add Weblinc Office and AlertLogic IPs to Rack Attack Safelist
Prevents Weblinc and AlertLogic IPs from being blocked by
from viewing the application. This also includes integration tests for
Rack::Attack safelisting and throttling rules, enabling
implementers to easily test their own custom rules.
Retain Row Type in Imports/Exports
Workarea previously locked the model class that one updated within an
import or export to the corresponding index from which the user came in
the admin (e.g., for products, the "Import" button will import
Workarea::Catalog::Product models and its embedded data). This caused
an issue with models that use "STI" and inherit from others, because the
data file engine couldn't tell the difference between a brand-new
Pricing::Discount and a brand-new
Pricing::Discount::FreeGift, for example.
_type column provided within the CSV/JSON exports will now be used to
instantiate the model so a single discounts data file can contain information
for every type of discount that Workarea supports.
Populate Product Attributes In
In the real world, a product has its attributes copied into
before the order is placed. In testing, however, this does not occur,
product_attributes hash is empty. Workarea now ensures that the
#create_placed_order factory method assigns
product.as_document as these
attributes in the same way as is done in the application, by utilizing the
Workarea::OrderItemDetails service object.