Adding items to the shopping cart

The items can be added to the shopping cart by calling the page with Shopping cart web part with following URL parameters:

- productId - the ID of the product stored in the NodeSKUID database field (in the CMS_Tree table) or SKUID (in the COM_SKU table)

- quantity - the number of product units to be added to the shopping cart

 

It means your link will typically look like this:

 

 

<a href="~/shoppingcart.aspx?productId=10&quantity=1">Add to cart</a>

 

 

In the transformations, you can use the following method to display the link to the shopping cart:

 

 

<%# EcommerceFunctions.GetAddToShoppingCartLink(Eval("NodeSKUID")) %>

 

 

 

 

 

Shopping cart URL

 

If you use functions like GetAddToShoppingCartLink, the shopping cart URL is taken from the Site Manager -> Settings -> E-commerce -> Shopping cart URL value.