One Hour: 312 Free Hot Subs Given Away

To celebrate the 10th Anniversary of SUBWAYâ„¢ in Taiwan, participating restaurants had a free hot sub giveaway for one hour on 2007-10-26. This is a time-lapse video from SUBWAYâ„¢ Qingcheng Restaurant where we gave away 312 free hot subs in one hour.


SUBWAYâ„¢ Qingcheng Restaurant:

The SUBWAYâ„¢ trademarks are owned by Doctor’s Associates Inc. and the independent franchised operator of this restaurant is a licensed user of such trademarks.

Media Coverage of Free Sub Giveaway

We’re getting some nice news coverage of the free sub giveaway. There was a news segment on ERA TV News (Channel 50) covering the event at the Neihu Ruiguang store. Lots of happy customers trying out the found, some great shots of the subs being made, and a short interview with Brendon, the store owner. It is nice to get a good event like this covered by the media.

Wow! 546 free subs in one hour!

We gave away 312 free subs at Qingcheng Restaurant and 234 free subs at Xingtian Temple Restaurant in just one hour today. One of the other owners gave away even more than that and also had two TV news crews covering the event at his restaurant. We also gave away buy one get one free coupons with every free sub in the hopes that we can get some new customers out of the event. All in all I’m very happy we got to give a lot of potential customers a taste of our food and service.

On Board

Every year each Subway market elects an board of franchisees in the market who will decide how to spend the advertising contributions in the market. Our election for the Taiwan board was in September and I ran for a seat (last year I didn’t qualify as I hadn’t been open long enough). Unfortunately I did not earn a seat in the election and was tied as second runner up. Today I found out that one of the board members resigned. The first runner up passed on the seat and the person I was tied with deferred to me, so I’m now on the Subway Taiwan ad board.

Web application development (part 4)

Et voila! My first application is complete. Since the last post I extended the edit module so that it would put in blank boxes for hours the store is open but for which there isn’t data already stored. (Actually I just have it put in entry boxes for everything from 8a to 11pm for every day, even though my Xingtian Temple restaurant is only open 10a-10p and Qingcheng restaurant is only open from 10a-10:30p on Saturday & Sunday. I’ll have to add in more smarts later so it will look at what hours the store is actually supposed to be open for.)

I encountered another couple of difficulties here, namely that when you add new inputs you have to also have a hidden form value for the foreign key id for the main table. So in my case since the main table is Daily and the multiple data fields are hourly, I have to have a hidden form value for data[Hourly][index][daily_id].

When it was editing existing fields this wasn’t a problem since it would figure out the missing values based on data[Hourly][index][id]. However when you are adding new stuff it is unable to make the connection and so the data gets stored without the foreign key and doesn’t get associated correctly. You also have to do the correct magic to create a new object when saving new (as opposed to updated) data, but that’s straightforward from the add example I referenced in part 3.

I also completed the add controller and add view with the ability to add the daily and hourly data all on one screen. This was actually quite straightforward once the edit stuff was done. Again, the main hitch is making sure you get the hidden field for the foreign key id in there or it won’t go in the db correctly.

The final piece was to give me a scheduling view. Basically I set up a scheduler controller and view under dailies which would take a store number, number of weeks and ending date of the schedule analysis. The last two are optional and default to 1 week and the date of the latest daily in the db for the store, respectively. It then will make up an average of units sold for each hour on each day (i.e. each of the Tuesday’s 8:00 sales averaged, etc.) and based on that would give a number of hours to schedule each employee.

I can’t describe it in much more detail than that because while this sort of calculation is common in food & beverage operations, the details of the method SUBWAYâ„¢ uses is proprietary. I’m still tweaking the algorithm on how to do the scheduling, but right now it’s roughly based on the Subway method with a few tweaks to make it look better to me. I also need to make the tweak parameters configurable in the database instead of hard coded in the code, but that’ll have to wait a bit.

It looks like I can cut down my morning and afternoon scheduling a bit and actually could use a bit more people at lunchtime than I had thought. But also overall it looks like I should be able to save quite a bit on labor costs with a more efficient schedule while at the same time improving service levels during busy times.

There’s a few other things I need to do. For example, there’s a fair amount of code that I probably should have put in the controller that I put in the view instead. I think I reverted to non-MVC programming practices quite a bit. I think from the MVC philosophy you shouldn’t be doing much more than displaying stuff in the view. Anything where it is calculating stuff should be in the controller. I also need to figure out how to modularize the code better.

But, hey, it works. Woo woo!

Web application development (Part 2)

Thanks for all the great feedback on my previous post. I had previously wondered why I don’t get a lot of comments on my posts and I think I’ve discovered why. I haven’t been making postings that were nerdy enough for my readership. Well, I guess I’ve learned my lesson.

I got a lot of good advice about using Drupal, CakePHP and Rails. I also got some offline advice to look into another PHP framework called Symfony. Symfony has one good thing going for it in that it has a book out which is available locally, which isn’t something any of the other PHP frameworks have going for it. (Drupal has at least one book available locally and Rails has at least a dozen.)

Anyways, after weighing all the good suggestions, I gave a stab at learning CakePHP. I found a few good tutorials online, probably the best of which is Sitepoint’s article The CakePHP Framework: Your First Bite. I combined that with a couple of other tutorials and within a couple of hours had an application with basic user authentication working. It really was pretty easy.

Today I worked on setting up the modeling for my first web application. I want to have a system where I can enter the hourly sales breakdowns from our daily receipts to come up with a schedule predictor of how many staff should be on duty at what times. SUBWAYâ„¢ has a way to do this but it involves employees writing information on dead trees and the manager to calculate by hand this data weekly. Much easier to just enter the raw numbers from the Z-Tape receipt each day and have it calculate things for me.

So I’ve finished modeling the four database tables needed and their relationships, and have entered some basic data with scaffolding. I think the modeling is pretty much set at this point and I can start building the controllers and views.

All in all it’s been fairly easy to get to this point and already I can see all the work that’s needed to get this complete. It’s quite possible I’ll have a working application by tomorrow and can bring the results to my manager at our weekly meeting on Wednesday.

Better yet, as soon as I get the authentication framework a bit more robust I can get my manager access and have her do the weekly data entry and set the employee scheduling herself. And the eventual goal is to get everything we do now in Excel and E-mail to be done via web applications.