Discussion Forums  >  Uncategorized

Replies: 13    Views: 397

ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
04/17/11 04:01 AM (14 years ago)

one time special offers? coupon?

is it possible to set up a sales special (coupon) that if used in the app disappears or something so it can't be used over and over? so the same customer doesn't try to keep showing a coupon in an app over and over in the same day.... that make sense? thanks!!
 
Ninjaselo
Apple Fan
Profile
Posts: 221
Reg: Apr 04, 2011
TR, Izmir, Alsa...
2,910
like
04/17/11 12:42 PM (14 years ago)
I was wondering the same thing :) I want to build an app for my Bar.(menu, info, address, socials & DİSCOUNT COUPONS) But when someone uses it, I want it to expire & be unavailable, until I post/add another code in the future.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/17/11 10:25 PM (14 years ago)
This is a reasonable request and something that can be done in all sorts of ways. Usually, the best way to control it is server side, from your website. For non-techies, it's not super-duper easy but doable. For techies, or somebody willing to do a little research, it's always doable - like everything else ;-) Simple approach: Create a special offer screen that's nothing more than a Custom URL screen. Next...on the server, do a little processing with Javascript or .PHP. The idea is that you control what 'shows' based on some pre-determined thing. It's usually best to show a promotional graphic after deciding what to offer on a day of week, hour of day, date, etc. Example: If Monday, show this image, if tuesday, show this image, if wednesday show this image. Of course you could get wildy complicated. A bar could have a daily special graphic that only showed when appropriate and the bar tender could decide if it was valid or not. I can think of lots of things where this would be appropriate but only you can decide the implementation. You could do the same server-side processing by looking at the devices location (only show a coupon if they are in a certain region) or device type, only show a coupon for iPhone users, not iPad, etc.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/17/11 10:44 PM (14 years ago)
Hi Dave, thanks for the response...another thought is would it be possible for the special that is on the customers screen to become invalid after being used...like if it was tapped on and somehow not available again to the same user...so they don't get free beer all night because the bartender isn't keeping track...i'm sure this is not an easy feat for non programmers...cheers!! ian
 
Ninjaselo
Apple Fan
Profile
Posts: 221
Reg: Apr 04, 2011
TR, Izmir, Alsa...
2,910
like
04/17/11 11:17 PM (14 years ago)
thank you for your answer. to become invalid is my question is too.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/17/11 11:24 PM (14 years ago)
Ah...I see how this could be troublesome. Um... for non-techies...like an expiration. I'm wonding about the troubles of them 'seeing' it but not actually 'using it' I guess if you wanted to literally only show the thing the very first time they loaded it...you could a) Load the HTML page, use Javascript to set a cookie b) Show the image / coupon / text / whatever c) If the page was reloaded by the same device... show the generic message. Example: Simple html page with two 'containers'.. One will be error message (you've already seen this coupon) 2 would be the actual coupon....These containers would be 'div' or 'p' elements in the html. Both would start out with visibility:none... psuedo code.... if(myCookie.isSet)){ //show the error message document.getElementById(couponDiv).style.visibility = none; document.getElementById(couponDiv).style.visibility = block; }else{ document.getElementById(couponDiv).style.visibility = block; document.getElementById(couponDiv).style.visibility = none; //set a cookie for next time so they cannot see the offer twice document.cookie = 'set you cookie values here'; } There are countless tutorials about javascript and cookies and CSS display, block, etc. I'll try to write something simple for the gang if you can't. It'll have to wait a few days though - buried! Lets do this. If you NEED this created for you, meaning you dug around a bit and can't get it figured out, I'll make an example HTML file. Re-post if this is the case. I think you can if you give it a few hours.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/17/11 11:31 PM (14 years ago)
thanks!! i will work on it and report back...awesome as always!
 
Ninjaselo
Apple Fan
Profile
Posts: 221
Reg: Apr 04, 2011
TR, Izmir, Alsa...
2,910
like
04/17/11 11:39 PM (14 years ago)
thanks... I will dig the web & try to do this. and, ianjamespiano, I think it will be cool if we both post the status of our invalidation with cookies work here.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/17/11 11:55 PM (14 years ago)
Couldn't resist, wrote the darned thing... Load this http://www.buzztouch.com/applicationScreens/coupon-expires.html in your browser... click refresh... see what I mean? You'll only be able to see the 'coupon' once every 30 days. Do a 'view source' and save it to your machine. Toss it on your web-server and modify the CSS, image, style, etc. Hope it works out for ya'
 
Ninjaselo
Apple Fan
Profile
Posts: 221
Reg: Apr 04, 2011
TR, Izmir, Alsa...
2,910
like
04/18/11 12:13 AM (14 years ago)
Thank you soo much, I will try now...
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/18/11 12:23 AM (14 years ago)
MANIAC DAVID BOOK in da HOUSE!!
 
Ninjaselo
Apple Fan
Profile
Posts: 221
Reg: Apr 04, 2011
TR, Izmir, Alsa...
2,910
like
04/18/11 12:57 AM (14 years ago)
A question, instead of this: createCookie(cookieName, yes, 30); can we write this to show after 7 days? createCookie(cookieName, yes, 7);
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/18/11 01:36 AM (14 years ago)
Yes...that should work. It should work with any number of days as long as the number is greater than 1
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
05/11/11 06:42 AM (14 years ago)
Hello. I have been working a bit with this. my idea is for it to show a picture of one offerings. when you drag the slider, a new image that says thank you to use our coupon. I do not get to it to change the image or make a redirect in iPhone safari. but if I use mac safari the redirect works. here are all files with the slider. www.sweapp.se/bt/coupon/SlideToUnlock.zip If there is anyone who wants to look at this!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.