Display the Text or Images on the Order Confirmation Page only.
Follow the steps below to render a text or an image on the Order Confirmation page.
Solution
- Create a Custom Tag
Note: Tag substitution is required to accomplish this.- Navigate to Commerce > Site Builder > Tags > New
- Tag: Enter Tag
Example: CHECKTAG - Description: Enter Description
- Default Value: Enter Default Value
- Tag: Enter Tag
- Click Save
- Navigate to Commerce > Site Builder > Tags > New
- Add a <div> Tag in the Theme
Note: This is the location of the text that is displayed on the Order Confirmation Page. It is the user’s preference on where to place it in the Content Area.- Navigate to Commerce > Site Builder > Themes
- Click Edit on Custom Theme applied on the webstore
- Click Body tab
- Content Area Template: Enter a <div> tag that contains an ID for the Tag Substitution
Example:<TD><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"></TABLE><div id = "ordertagid"></div></TD> - Footer Template: Enter the Custom Tag created at step 1 enclosed in opening and closing chevrons.
Example: <CHECKTAG>
- Content Area Template: Enter a <div> tag that contains an ID for the Tag Substitution
- Click Save
- Enter the value for the custom tag.
- Navigate to Commerce > Site Builder > Tabs
- Click Edit onCheckout
- Click Tag Substitution tab
- Tag: Select Tag
Example: CHECKTAG - Substitution Value: Enter the Custom Code that will show the Text or Image
Example: <script type="text/javascript">
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
var order_cat = gup( 'category' );
if (order_cat=="thanks"){
document.getElementById('ordertagid').innerHTML= "TEST";
}
</script>
- Tag: Select Tag