by ShopSite Lauren » Fri Apr 11, 2014 1:54 pm
There isn't a tag to pull the customer group information. However, thanks to this post, this feature will be added into the next release (likely a maintenance release) of ShopSite.
If you would like to add this information before the next release, you could use JavaScript to read the customer registration cookie, because the group a customer is assigned to is in the cookie information.
I haven't checked my code below (the basic idea is there), but here is some sample code that could work to pull the customer registration group from the customer registration cookie. I am not the best at JavaScript, so the code below is a bit messy, but should work.
<script type="text/JavaScript">
function DisplayLogGroup(name) {
var cookies=document.cookie;
var start = cookies.indexOf(name + "=");
var name = "";
var start1;
var end1;
var tmp;
var signed_in = -1;
if (start != -1) {
start = cookies.indexOf("|", start) +1;
var end = cookies.indexOf("|", start);
if (end != -1) {
signed_in = cookies.indexOf("|yes", start);
group = unescape(cookies.substring(start,signed_in));
if ((signed_in != -1) && (group != "<none>")) {
document.write(" - " + group);
}
}
}
}
</script>
<p>[-- CR_CUSTOMER_NAME --]<script type="text/javascript">DisplayLogGroup("[-- RegCookieName --]");</script>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.