Help with Setting & Reading a Generic Variable
The KB article: http://support.americommerce.com/hc/en-us/articles/201904650-How-do-you-use-Generic-Variable-Merges-
gives this syntax as an example: ##SET[MfgIs=##MFGNAME##]##
So what i wanted to do is:
##SET[ThisCat=##CATID##]##
The problem is - in contrast to what the KB article shows as an example, my variable appears to get set to a literal of "##CATID##" , rather than the numerical value of the CATID.
(this is visible in the output of ##GENERICVARIABLES##)
Here's the full code I'm using:
##SET[ThisCat=##CATID##]##
##IF[ThisCat=8]##
ThisCat is set to 8
##ELSE##
This is the ELSE statement - ##CATID##
##ENDIF##
##GENERICVARIABLES##
Any idea as to what is wrong?
-
where specifically are you trying to use this code? the ##CATID## merge code may simply be outside of its context if the merge is not rendering.
0 -
I'm using this on a category page.
If I just put ##CATID## on the page, it outputs the id number just fine.
0
Please sign in to leave a comment.
Comments
2 comments