Tag: Admin

OrderCloud HeadStart Featured Products Configuration

We saw how to set up the OrderCloud Headstart buyer and seller websites in the previous article.
My buyer application’s main page is blank after I configured my Ordercloud Headstart application.


I examined the code and discovered that the feature products list must be presented on home page, and the logic is already there in the buyer application code. Here is where we may look at the code that has been implemented here.

In second screen shot you can check “xp.Featured” filter is responsible to get the featured products from Order cloud commerce. Featured is the extended property and it is not configured and found in Headstart Seller code. To enable this feature we have to configure or managed the Featured products in the seller application and this code is missing.

I have implemented the feature product configuration code in seller application. We have added the featured product checkbox field in Product creation section (please see below screen shot). Admin or seller can able to set the product as a featured product by selecting the Featured checkbox flag.

We have to update existing component code and please find the below detail below.

Component location path: src\UI\Seller\src\app\products\components\product-edit\product-edit.component.html.

Add below html block under “productInReviewNotifications” .

Code base location : src\UI\Seller\src\app\products\components\product-edit\product-edit.component.ts

Add Feature extended property to handleUpdateProduct method.See below screenshot.

Add below code line to createProductForm function.

Featured: new FormControl(_get(superHSProduct.Product, ‘xp.Featured’)

Add below code to existing code file :- src\UI\Seller\src\app\products\product.service.ts

Featured property to XP object.

By adding all the above code to Seller application code you are able to see the feature product listing on buyer application home page.

References

  • Find documents here
  • Headstart Repo here