Affiliate Theme Object


This article is meant to help you integrate Hotcakes Commerce affiliate functionality directly into your store design to automatically allow the store to look for and properly credit affiliates for referring business to your store.

The key thing to know here is that you don’t actually need to do anything except copy and paste the theme object code below…  It is literally that easy!


The following information is required to already be known:

  • How to design for the CMS, sometimes called “skinning”
  • How to write and manipulate HTML and CSS
  • Basic understanding of ASP.Net server/user controls (or copy/paste)

Though the terms have since changed to "theme," skinning and skin objects may be new terms to you.  Basically, they are unique terms that describe skills that you probably are already using on a daily basis.


In order to implement a theme object into your skin (design), it would be necessary for you to first create a theme.  Once you do, this documentation will help you know what you need to know in order to add the skin object to your theme. 


The affiliate theme object is a snippet of code that you add to your design.  This theme object will look in the URL for an affiliate ID.  This ID will be in the URL of a referral link and will look something like this:

In the example above, note the last part of the URL, known as a query string. 


This value will be parsed and if there is a valid affiliate id in the “affiliate-id” portion of the URL, the affiliate will get credit for purchases in your store, according to the configuration you have set in the store admin.

All you have to do to make this work effectively is add the snippets of code below to your page!

How to Use in Your Theme

The skin object is part of your Hotcakes Commerce installation.  Therefore, there are no additional downloads or installation for you to worry about.  As long as Hotcakes is installed, this theme object will work when your theme is installed.

Once your theme is ready for the theme object, copy and paste the following values into the HTML of your skin.  This code sample assumes you’re doing the ASCX method of theme design.

Header Area

The following code snippet is used by developers and designers alike in ASP.Net websites to tell the design where the code lives.  You can think of this like a server-side include. 

<%@ Register TagPrefix="hcc" TagName="HCSKINAFFILIATE" Src="~/DesktopModules/Hotcakes/SkinAffiliate/SkinAffiliateView.ascx" %>
Design Area

There is no need to determine where to put this theme object in your design since end-users will not see anything on the rendered page.  That being said, like any other design element, it could always be moved later. 

Copy and paste the snippet below into the desired area of your design.

<hcc:HCSKINAFFILIATE runat="server" />

Save your design file and you are done…  It will just work once your store is live and accepting affiliates.


Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.