Select version
v7.7 v7.6 v7.5 v7.3 v7.1 v7.0 v6.8 v6.7 v6.6 v6 v5 v4 v3 v2

Marketing Library

The Marketing library in uCommerce, enables you to easily integrate your marketing campaigns in your web-applications.

The Marketing library has two methods, that can be used to interact with the discounts on the current Purchase Order.

Add Voucher

The AddVoucher(string voucherCode) method is used for adding a voucher to the current PurchaseOrder.

The voucherCode parameter is a voucher code that has been generated in the Marketing Foundation backend.

Example:

    
    // Adding a voucher to the current basket.
    MarketingLibrary.AddVoucher("testcode123");
    

Get Targeted Campaign Items

The GetTargetedCampaignItems() method gives you a list of the targeted campaign items for the current user context.

Example:

    
    var campaignItems = MarketingLibrary.GetTargetedCampaignItems();
    foreach (var item in campaignItems) 
    {
        // Printing out all the campaign items for the current context.
        Response.Write(item.Name);
    }
    
uCommerce Aps - Studsgade 29B - 8000 Aarhus C - Denmark
Phone +45 61 799 997 - Email [email protected] uCommerce logo