0

Can the below 2 codes work as one inline ampScript on the html page? For example, the following is the copy I want to turn dynamic: Until 30 March 2023, you can get our boiler cover2 from £7.50 a month for your first 6 months. That’s half the usual price for the first 6 months, to help keep your boiler working safely and efficiently.

My two codes are :

'%%[
Set @field_energy_type = AttributeValue("energy_type")
If Empty(@field_energy_type) Or @field_energy_type = "" Then
Set @value_energy_type = " Until 30 March 2023..."
Else
Set @value_energy_type = ""
EndIf
]%%  

%%[
SET @energy_type = "dual_fuel"
IF @energy_type == "electricity_only" THEN
SET @price = "£7.50"
ELSEIF @energy_type == "dual_fuel" THEN
SET @price = "£12"
ELSE
SET @price = "£7.50"
ENDIF
]%%'

And the following Ampscript based rules within the code I want to archive:

  1. If the field energy_type is not empty then show the copy starting 'Until 30 March 2023... all the way until below the 'Sign me up' call to action.'

  2. If the field energy_type = electricity_only then the price in the above paragraph should be £7.50 a month, if the field energy_type = dual_fuel then the price should be £12 per month.

Hope this helps.

Thanks in advance.

And the following Ampscript based rules within the code I want to archive:

  1. If the field energy_type is not empty then show the copy starting 'Until 30 March 2023... all the way until below the 'Sign me up' call to action.'

  2. If the field energy_type = electricity_only then the price in the above paragraph should be £7.50 a month, if the field energy_type = dual_fuel then the price should be £12 per month.

Hope this helps.

Thanks in advance.

0 Answers0