Return to Previous Page
As the DNN Store Manager, I enjoy working on DNN Corp.'s Product Team and helping ensure both vendors and customers are more than satisfied with their experiences on the Store.
With over 2000 transactions each month, the DNN Store provides modules, skins, and other products to help DNN users quickly and easily build their business or personal websites. If I can help you with any questions about the Store, please contact me at [email protected].
This blog was originally posted to the DNN Community Blog on October 28, 2013 by Nathan Rover. Nathan has been building sites using DNN for the last 9 years and has worked at DNN Corp for over 3 years. As part of the Engineering Team, he currently works on projects for both the DNN Store and dnnsoftware.com.
In an attempt to simplify participation with the referral program on the Store, I have developed a new free and open source module that anyone can use, but is specifically designed with the referral program in mind. In the module settings, there is a field where you can enter one of the referral codes from the store. Once populated with a code all of the links generated in the module output will automatically have the referral query sting value/pair added.
The module can be configured in a few basic modes and will automatically obtain the product data via a server side web service call to the store. The following render modes are currently available (more may be added based on feedback).
There is also a setting to limit the number of results pulled from the server. By default this is set to 5, but you can change this number to whatever you would like in order to customize the output to best fit your site. It's important to note that many of the search methods have a server controlled maximum result set of 100. This is by design to help keep server load to a minimum. Along the same lines, the results of each mode are cached on the server side, but an additional layer of caching is available in this module. The module can cache the results on your site. Using this will reduce the number of service calls sent to the store and will ensure that this module doesn’t slow down the load time of your site.
The module output is constructed server side and uses three templates to allow you full control over how the products are rendered. The first template is the “Primary Template”. This is the outer container for the results, and the only token in this template is [RowTemplate]. When rendered, that token will be removed and replaced with all of the rendered row templates. The next Template is the “Row Template”. This template supports only one token; however, it can be repeated. So, for example, if you would like to display one item per row and you are using a div based layout, you would use “<div>[ItemTemplate]</div>”. However, if you are using tables and would like to show three items per row, you would use “<tr><td>[ItemTemplate]</td><td>[ItemTemplate]</td><td>[ItemTemplate]</td></tr>” The module will automatically do the math, and if you set it to display twelve results using the previous template, it would create four rows with three items each. Using the previous div template example, it would make 12 rows with one item each. The third template is the “Item Template”. This is used to control how each item is rendered. This template currently supports nine tokens, which are as follows:
There is also a fourth template that will allow you to control what is shown in the event that the module has no results to display.
As you can see, this module is capable of supporting horizontal and vertical rendering, table or div based rendering. If you want to get even more creative, you can include the right jQuery and make a product carousal or flip book. (If you do, please send me a link. I would like to see it!) I tried to keep the module as flexible as possible in the hope that everyone who wants to use this module will be able to customize it to fix the style and layout of their site.
Some additional notes about this module: it’s fully localized, even the default settings are localized. However, currently English is the only option. If anyone produces a translated resource file, let me know, and I'll include it in the package. The minimum required version of the DNN platform is 5.1.0. The minimum required version of the .NET platform is 3.5. The module is Azure compatible and passes EVS without error or warning. http://evs.dnnsoftware.com/results.htm?fileId=585af9db-64c3-4ad7-83c2-3eb282eeb9c2
The latest release of the module can be downloaded here: https://dnnreferralmodule.codeplex.com.
The source code is available on GitHub here:https://github.com/NateDawgCC/DNNReferralModule.
Anyone who is interested in making enhancements to the module is welcome to fork the code on GitHub. Any questions or issues with the module can be sent to me directly at [email protected]. If you would like more information about the DNN Store referral program, please check out this page: http://store.dnnsoftware.com/make-money/referral-program.