Adding products to the cart from Product details page
- You must have the
Order capture(ISF000048) resource permission to view the Add to cart, Check out, and Mini cart actions in the Product details page. - When the store associate scans a product, the
getCompleteItemListAPI is called to retrieve the product details. When a product is scanned, the default quantity is set to 1 and the delivery method is set to CARRY if theAllowCashAndCarryLinesrule is set totrue. Else, the default delivery method is taken as Ship. - The
modifyFulfillmentOptionsAPI is called to add the product to the cart. If you scan a serial number,SerialNoand the current store as ShipNode is stamped on the OrderLine. If the same product is scanned twice, two order lines are added with quantity as 1 for each order line. - The
getCompleteOrderDetailsAPI is called to retrieve the updated order details and refresh the page. - Mini cart
You can see the mini cart icon with the count for the items in the cart. When you click the mini cart, cart item details are displayed. If the cart does not contain any item, the mini cart is disabled.
The following APIs are called for implementing the mini cart:getCompleteOrderLineListAPI is used to show all order lines.modifyFulfillmentOptionsAPI is used to remove an order line.
- Adding serialized products to the cartYou can add serialized products to a cart with any delivery option based on its availability.Note: The serial number information is mandatory only for Carry orders of serialized products. For Pick and Ship delivery methods, capturing serial number for serialized products is not required and no warning message is displayed.
- Each quantity of the serialized product is a separate order line. You must not disable the quantity option. When a serialized product is added to cart, one line is added with the serial information and the rest are added as separate lines without the serial information, which is mandated in the View cart page.
- When you scan a serial number and add more than one quantity, the application passes
SerialNoto oneOrderLineand not to any other orderLines. After aSerialNois successfully added to the cart, a success message is displayed. The serial number is displayed in the mini cart. - If a serial number that is already added to cart is scanned again, an error message is displayed.
- You can add multiple units of a serialized product to the cart by scanning a single serial number. In this case, only one order line in the cart contains the serial number.
- If after scanning a serialized product, the delivery method is changed from Carry and the
product is added to cart, it is added without the serial information.
However, a warning message is displayed to scan the serial number for serialized products in the order without serial information before proceeding to the payment capture page. You can use the Scan product action to capture the serial number information for serialized products.
- The
translateBarCodeAPI is called withBarCodeTypeasSerialScanandItemID,InventoryUOM, andProductClassare passed asItemContextualInfothat is used to identify the serial number. - After the serial number is identified, if the product with same serial number is already added
to the cart, an error message is displayed and a different serial number must be scanned.
If the serial number that is identified is not part of an existing order, the
modifyFulfillmentOptionsAPI is called to stamp the serial number and current ship node on the order line. - The serial number information must be captured every time you add a new serialized product or change the delivery method of an existing serialized product from Pick or Ship delivery method to Carry. The serial number information is not cached in the user interface and must always be scanned to add to the order line.
- Overriding the price
You must have the
ISF000045resource permission to be able to override the price of the products.When the product price link is clicked, the Price override window opens. The
getCommonCodeListAPI is used withCodeType="YCD_PRICEOVERRIDE"to get the price override reasons. When Save is clicked, the updated information is added to the product details, which is passed to thecreateOrderormodifyFulfillmentOptionsAPIs. - Choosing nearby or alternate stores
For pickup delivery method, store associates can choose nearby or alternate stores by using the
getAlternateStoreAvailabilityAPI by passing data such asShipToAddress,FulfillmentType,DistanceToConsider,OrderLines data, and so on.