Checkout - Shipping Method

Display available shipping methods for the customer to select. Shipping methods can be filtered on the store and country level.

 


Relevant APIs

 

 

UCommerce.Api
     TransactionLibrary.GetShippingInformation()
     TransactionLibrary.GetShippingMethods(country = null)
TransactionLibrary.GetShippingMethod(shipmentName = null)
UCommerce.EntitiesV2
     Shipment
     ShippingMethod
          GetPriceForCurrency(currency)
UCommerce
     Money(amount, currency)     

Hands-on

Find the “ShippingController” The method Index() renders the “Views/ShippingMethods.cshtml” view. Map the shippingmethods available into the viewmodel.


 

Update Selected Shipping Method

Relevant APIs

UCommerce.Api
    TransactionLibrary.CreateShipment(
        shippingMehtodId, 
        addressName = null, 
        overwritingExisting = true)
    TransactionLibrary.ExecuteBasketPipeline()

 


Hands-on

In the POST method of your ShippingController you need to create a new shipment based on selected shippingmethod.

 

{{lineitem.ProductName}}

{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}

Your cart is empty ;(
Total {{basket.FormattedProductsTotal}}
Checkout