B2B Reorder

B2B Organization User Registration allows users to request a new account. Once registration is enabled, users can use a form to provide their information and submit their request for a new account.

The Reorder button appears on the Order Details page, which you can access by selecting Order History from the My Account menu, and then selecting any order.

The following is an example of the Reorder button, which appears by default at the bottom of the Order Details page:

Enabling Reorder

You can enable the reorder feature by installing the @spartacus/order feature library. For more information, see Installing Additional Composable Storefront Libraries.

CMS Components

The reorder feature is CMS driven, and consists of the AccountOrderDetailsReorderComponent CMS component.

You can configure the reorder feature by using SmartEdit to display the AccountOrderDetailsReorderComponent component in composable storefront, or you can manually add the component to a content slot using ImpEx.

If you are using the Spartacus Sample Data Extension, the AccountOrderDetailsReorderComponent component is already enabled. However, if you decide not to use the sample data extension, you can enable the component through ImpEx.

Adding the CMS Component Manually

This section describes how to add the AccountOrderDetailsReorderComponent CMS component to composable storefront using ImpEx.

$contentCatalog=powertools-spaContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]

You can create the AccountOrderDetailsReorderComponent CMS component with the following ImpEx:

INSERT_UPDATE CMSFlexComponent;$contentCV[unique=true];uid[unique=true];name;flexType;&componentRef
;;AccountOrderDetailsReorderComponent;Account Order Details Reorder Component;AccountOrderDetailsReorderComponent;AccountOrderDetailsReorderComponent

You can add the AccountOrderDetailsReorderComponent CMS component to the BodyContent-orderdetail slot with the following ImpEx:

UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];cmsComponents(uid, $contentCV)[mode=append]
;;BodyContent-orderdetail;AccountOrderDetailsReorderComponent

Configuring

No special configuration is required.

Extending

No special extensibility is available for this feature.