Is it possible to get campaign id from a custom campaign condition

We need to build a custom campaign condition which will do some validation to check if the campaign should be applied and we wonder if there is any beautiful way to get the base campaign id which will be applied if this condition is okey.

It is a simple condition which uses the example guide of CartConditionType and override IEnumerable Evaluate(ConditionArgs conditionArgs) method to decide if it is valid.

Is it possible to get the base campaign id from a campaign condition inside the Evaluate method?

Litium version: 6.3.2

Reference to the example documentation: https://docs.litium.com/documentation/previous-versions/litium-6/litium-documentation/sales/campaigns/creating-a-custom-condition_1_1

It exists 2 new interfaces that was introduced in 6.3.2 version

  • Litium.Foundation.Modules.ECommerce.Plugins.Campaigns.IConditionWithOrder
  • Litium.Foundation.Modules.ECommerce.Plugins.Campaigns.IRequireCampaignInfo

If you implement the IRequireCampaignInfo on your action or condition you will get the CampaignInfo passed into the interfaces init method. The CampaignInfo contains information about running campaign.

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