Posts Tagged ‘Product’
Most of the medium and small ecommerce application support generic order process where the user has to add their products to shopping cart, manually checkout the basket, provide shipping, billing addresses and payment details. This is five page refresh process. The process will be applicable to the customer who wants to buy more products at once. Most of the customer will buy single product at a time and only few customers will perform bulk orders. To help single purchase buyers, we can implement Quick order.
Quick Order (or single click ordering) is a very useful and powerful tool and can be built for ecommerce customers and customer service representatives (CSR), who works from back office. By allowing customer to make their purchase quickly and in reduced steps will encourage them to come back and make another purchase in the future. CSR can reduce the call time with the customer if s/he can order the product in reduced steps which improves efficiency. Quick order application via the automated IVR system can provide 24×7 accesses for customer to purchase on phone. Quick order process will work well with the registered user and may/may not work with anonymous user.
Registered User:
View Product -> Click Quick Order button -> Order confirmation (if required) – > Order Display
Non-register user:
View Product -> Click Quick Order button -> Accept Billing & Shipping Address -> Accept Payment -> Order confirmation (if required) – > Order Display For quick order process, we have to do some customizations in commerce server.
- Extend commerce server profile System to capture following details
- Default billing address
- Default shipping address.
- Default Payment Method.
- Default Credit/Debit card (if payment method is credit card)
- In the registration form, try to accept following details from the customer
- Billing address
- Shipping address
- Payment details
The application can use the information available in the user profile while performing quick checkout. So, when the user clicks on quick check button on product page, the following actions should take place.
- Input Values expected from UI – User Id, Catalog Name, and Product Id.
- Retrieve commerce server context of catalog, order and profile subsystems.
- Create new basket.
- Retrieve user profile properties like address Id, credit card Id, etc.
- Retrieve product details from Catalog subsystem and populate into basket.
- Retrieve address details from profile subsystem and populate into basket.
- Retrieve payment details (credit card) from Order subsystem and populate into basket.
- Execute pipelines in the following order and then convert basket into Purchase Order.
- Basket
- Total
- Checkout
Click here to download Quick checkout code
If you like this post, please click on our sponsor advertisement.
Ecommerce application needs product updates daily or frequently to show up to latest products information on their website. Sometimes the product information gets from company business users and sometimes the products information comes from vendors. For large scale ecommerce application, middleware servers like BizTalk are used for product import.
This current tool (attached to this article) is command based tool and be perfect for small companies with limited data upload and can be used only one time (during application migration) or regularly. This tools takes catalog data using excel file and through commerce server API, it inserts data into database.
The excel file template contains three sheets.
1. First sheet name is “CategoryData” – This sheet contains categories details.
2. Second sheet name is “ProductData” – This sheet contains product details.
3. Third Sheet name is “VariantData” – This sheet contains variant data.
Note: Kindly don’t change sheet names.
When the tool is executed, it will ask for data excel file path. Once correct path is provided, it will ask whether to import category data, product data or variant data. Based on the option selected, the tool starts porting data into commerce server.
The assumption is that the given catalog and product definition are created in commerce server.
How to add a category?
Category can be created under a Catalog only. So, before we create category, the application should get context of Catalog, then by using method CreateCategory(), category can be created.
BaseCatalog baseCatalog = (BaseCatalog)context.GetCatalog((string)row["CatalogName"]);
Category category = baseCatalog.CreateCategory((string)row["CategoryDefinition"], (string)row["CategoryName"]);
category.DisplayName = (string)row["DisplayName"];
category.Save();
How to add a Product?
Product can be created under catalog or category. So before we create product, the application should get catalog context. By using CreateProduct(), a product can be created. If the products need to be created under a category, then pass category information to CreateProduct() method.
BaseCatalog baseCatalog = (BaseCatalog)context.GetCatalog((string)row["CatalogName"]);
Product product = baseCatalog.CreateProduct((string)row["ProductDefinition"], (string)row["ProductID"], Convert.ToDecimal(row["ListPrice"]), (string)row["CategoryName"]);
product.DisplayName = (string)row["DisplayName"];
product["Image"] = row["Image"];
product["Description"] = row["Description"];
product.Save();
How to add a variant?
Products may or may not have a variant. For example, a shoe can have multiple variants like size, color, etc and some products don’t have variants like Books. To create a variant, the application should get product definition and to get product definition, the application needs to get catalog context. Once product definition obtained, we can add a new variant using AddVariant() method as shown below.
BaseCatalog baseCatalog = (BaseCatalog)context.GetCatalog((string)row["CatalogName"]);
ProductFamily productFamily = (ProductFamily)baseCatalog.GetProduct((string)row["ProductID"]);string variantID = (string)row["VariantID"];
// Add the variant to the product family.
productFamily.AddVariant(variantID);
// Set the properties for the variant product.
productFamily.Variants[variantID]["VariantActualPrice"] = Convert.ToDecimal(row["VariantListPrice"]);
productFamily.Variants[variantID]["Color"] = (string)row["VariantColor"];
productFamily.Variants[variantID]["Size"] = (string)row["VariantSize"]
productFamily.Variants[variantID]["VariantDisplayName"] = (string)row["VariantDisplayName"];
productFamily.Save();
If you have any questions/suggestions on his approach, feel free to send your comments. Click here to download Catalog Importer.
If you like this post, please click on our sponsor advertisement.
