Demac Media Demac Media Brand Demac Media Brand



Extension Update: Contest / Lucky Draw Manager

Timer Icon 2 Mins

Magento Commerce, Magento Tutorials

Last week, I crafted an extension to manage the contests & lucky draws.

The requirements:

– Submission page with customizable content sections

– Backend management for the contest, its content sections and its submissions

– Multi-store (languages) support

The submission form is just a tweaked customer register form.  However, its contents, e.g. header section, have to be store specific.  As you can see below, the header of the same contest in EN and FR stores are different.

My approach for this is to separate the content management and the contest management.  Each contest has 3 content sections (header, left and footer).  The contents are identified by a block prefix and store id.  Let says when you are store A,  the contest page will look for the header contents that matches the block prefix and store A.  If you are in Store B and the header content block does not exist in Store B,  the header would not be displayed.   This approach also allows a content block to be used on multiple contests.

The following screenshot shows how you can set up a contest page and a content block for EN and FR store.

You can monitor the submission after the contest starts and you can even play with the “Pick Winner” button to randomly pick a winner.

This concludes the initial version of contest extension.

Subscribe to the Blog

Stay updated with 20,000+ eCommerce leaders in our community

Sign Up

Let’s talk about your 10X return

Icon/Social/Phone Contact us for pricing information