I have two amp script conditions in the email,
Condition1: (to show the content based on country code)
IF @CountryCode == "RU" THEN SET @CountryCode = "EN"
ELSEIF @CountryCode == "RO" THEN SET @CountryCode = "EN"
ELSEIF @CountryCode == "BE" AND @Language == "NL" THEN SET @CountryCode = "NL"
ELSEIF @CountryCode == "BE" AND @Language == "FR" THEN SET @CountryCode = "FR"
ELSEIF @CountryCode == "BE" AND (@Primary_Language__pc != "NL"
OR @Primary_Language__pc != "FR")
THEN SET @PersonMailingCountryCode = "FR"
Condition 2: (to display to preheader, footer details based on country code)
%%[
IF @Customer =='True'
AND (@CountryCode == 'BE'
AND @Language == 'fr')
THEN
]%%
%%=ContentBlockById("123456")=%%
%%[
ELSEIF @Customer =='True'
AND (@CountryCode == 'BE'
AND @Langaugae == 'nl')
THEN
]%%
%%=ContentBlockById("234567")=%%
%%[
ENDIF
]%%
%%[
IF @Customer =='False'
AND (@CountryCode == 'BE'
AND @Langauge == 'fr')
THEN
]%%
%%=ContentBlockById("34567")=%%
%%[
ELSEIF @Customer =='False'
AND (@CountryCode == 'BE'
AND @Language == 'nl')
THEN
]%%
%%=ContentBlockById("45678")=%%
%%[
ENDIF
]%%
%%[
IF @Customer =='True'
AND (@CountryCode == 'BE'
AND @Language != 'fr'
AND @Language != 'nl')
THEN
]%%
%%=ContentBlockById("56789")=%%
%%[
ELSEIF @Customer =='False'
AND (@CountryCode == 'BE'
AND @Language != 'fr'
AND @Language != 'nl')
THEN
]%%
%%=ContentBlockById("67890")=%%
%%[
ENDIF
]%%
%%[
IF @Customer =='True'
AND @CountryCode != 'BE'
THEN
]%%
%%=Contentblockbyname(Concat("Content Builder\Test\preheader_SFDC_",CountryCode),"",0,ContentBlockByName("Content Builder\Test\preheader_SFDC_",CountryCode_EN"))=%%
%%[
ELSEIF @Customer =='False'
AND @CountryCode != 'BE'
THEN
]%%
%%=Contentblockbyname(Concat("Content Builder\Test\preheader_SFDC_",CountryCode),"",0,ContentBlockByName("Content Builder\Test\preheader_SFDC_EN"))=%%
%%[
ENDIF
]%%
When I use both conditions, my pre header, signature and footer ampscript changes to English automatically and body content reflect the content based on condition 1. when I use just condition 2, my pre header, signature and footer ampscript works as expected.
Can you please let me know what went wrong? It would be really helpful if anyone helps me find a way for this issue.
Condition1:
has anENDIF
at the end!