Free Shipping With Delivery Methods Action

If I have a campaign and it is of the type FreeShippingWithDeliveryMethodsAction. How can I get the list of witch delivery methods that are allowed in the campaign?

Litium version: 7.2

If you fetch the campaign, you can use this to get the data object for the campaign action.
var data = campaign.ActionInfo.GetData<FreeShippingWithDeliveryMethodsAction.Data>();

The returned class has a property DelivaryMethodIDsList [sic], which contains the IDs of the selected delivery methods.

1 Like

How can I use OrderTotalCondition inside my _campaignHandler.GetCampaigns to fetch these campaigns that are valid?

var campaigns = _campaignHandler.GetCampaigns(new CampaignHandlerArgs
            {
                ChannelId = _requestModelAccessor.RequestModel.ChannelModel.Channel.SystemId,
                OnlyProductCampaigns = false,
                OrderContainsCampaignInfo = false
            }).Where(x => x.StartDate < dte
                          && x.EndDate > dte
                          && x.CurrencyId == currencyID
                          && x.Action is FreeShippingWithDeliveryMethodsAction).ToList();

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.