Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Display of product variants, customer account deletion, region-specific storefront

Compare
Choose a tag to compare
@droibu droibu released this 27 Oct 09:03
· 3 commits to master since this release

Display of product variants in the cart details and checkout confirmation pages

Product variants lets the customer see all the different variations of the products in the storefront. For example, you can see the different sizes and colors that a t-shirt comes in. The storefront's cart details and checkout confirmation page now support product variants.

After you add an item to the cart and click the cart icon, you can see the item in the cart with the product variant information, if it is applicable. In the example below, a black t-shirt in size small is in the cart.

When you click Checkout, the checkout confirmation page also shows the same product information.

Price ranges for products with variants

In this release, new pricing functionality in support of variants allows you to set the price as one value or, if a product has variants, as a price range.

Depending on whether a product has variants and multiple prices, the service:

  • displays a single price for products without variants, and for products with variants that cost the same price
  • displays the price range for products with variants that have at least two different prices in the Storefront List page

InStock presentation for product with variants

To further support product variants, updates to the service's behavior in response to the inStock value include:

  • The inStock line is hidden in the Storefront List page for products with variants.
  • The information on the Storefront Details page changes depending on an item's availability:
    • Out of stock: Variants are out of stock
    • Add to cart: Variants are in stock

Customer account deletion

A customer with a storefront account can now delete the account if necessary. This feature requires the customer to sign into the storefront, go to the My Account page, and click Delete Account,.

Upon confirming the action, the system sends an email with a confirmation link to the customer's sign-in email address or, for accounts created with a social sign-in, to the customer's contact email address. You can set the confirmation URL in the configuration key customer.deletion.redirecturl, using the Configuration service. The token included in the email is valid for 24 hours.

After the customer clicks the link in the email, the system deletes the account.

Region-specific storefronts

To use the storefront in different regions, provide the --region parameter in the build task, which runs the store in the specified region. This means that the service URL the storefront calls points to that specific region, for example, https://api.eu.yaas.io.
If you omit this parameter, the service builds the storefront URL in the US region. For now, the other available region is the EU. Here is an example of the region parameter in use:

$ npm run-script singleProd -- --pid=abc --cid=123 --ruri=http://example.com --region=eu

HTTPS usage in the storefront

It is recommended that you use domains that are encrypted into a Secure Socket Layer (SSL) HTTPS session. You can enforce HTTPS instead of HTTP in the storefront by providing an additional parameter, --https, in the build task. Here is an example:

$ npm run-script singleProd -- --pid=abc --cid=123 --ruri=http://example.com --https

Anonymous login endpoint migrated

The endpoint used before by Storefront to get the anonymous access token is now deprecated: https://api.yaas.io/hybris/account/v1/auth/anonymous/login. We migrated it to the new https://api.yaas.io/hybris/customerlogin/v1/auth/anonymous/login.

We recommend this migration for the already implemented customer storefronts. The new call should use the following:

Method: POST
URL: https://api.yaas.io/hybris/customerlogin/v1/auth/anonymous/login
Body: { "clientId": <your_storefront_app_client_id>, "tenant": <your_tenant> }