This is a great project that you can either do on its own, or incorporated into a unit about Political Parties, Campaigning, Political Ideology, etc. There is a lot of flexibility in this plan so you can either do it with just one class or you can even mix classes. I first have students start off by taking an ideology quiz to determine where they fall on the political spectrum, and based on that they're grouped with other students who have similar beliefs. Then the real work begins - drafting their own political platforms, creating campaign ads, and then ultimately debating their classmates!
If you just do this in-class with no outside work assigned for students to complete, I'd say between 10-11, 60 minute class periods from beginning to end. Also, make sure that they have internet access as well as access to laptop/computer (to research and type their platforms,) as well as their phones/video cameras (to record their "TV Ads." All my students have done theirs on their phones or tablets, but if your students don't have those materials, make sure there is a program or device for which they can record their ads.)