Click here to Skip to main content
16,015,756 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to apply 50 rupees discount for every third time haircut by the same customer.

What I have tried:

I'm new at this. I hope i get some hints from the experts.
Posted
Updated 19-Mar-18 2:31am
Comments
F-ES Sitecore 19-Mar-18 6:49am    
This is just a vague requirement, not a question. Is it the discount you need to know how to do? Working out that it is the third haircut? Is it the database design you're not sure of?
Member 13734064 19-Mar-18 7:00am    
Yes, it is the discount procedure that i need to know.
off page seo 8-Nov-23 4:45am    
Crazy Monster Girl” is a popular South Korean manhwa series created by the brilliant author Tsunakou. This fascinating series is recognized for its unique fusion of supernatural, romance, and comedy genres.

1 solution

We can't answer that: it's just too vague and unspecific.
The problem is that you need to think of this as a whole system: you need a way to track - and identify - customers so that you can store their "hair cut history". Until you have that sorted, you don't have a way to do this in an electronic form.

So start by thinking how you would handle it manually: You'd issue each customer with a "loyalty card" which had spaces for a stamp. Each time the customer came to the shop, they present the card, you cut the hair, stamp the card, and if the number of stamps is a multiple of three, you give them a discount.

That's not a bad model for a computerised system, but you need to start with "identify your customer" - so they need to log in to a system. Which means you have to store customer details - username, real name, password, email, etc. and write a login system to match them us and prevent fraud (you don;t want to hand out discounts they haven't earned, do you?). And that means storing it all somewhere - a text file, a database: I have no idea what you are familiar with so I can't make suggestions.
Then you need to expand that to record hair cut details - a note of when they had a hair cut so your can check "how many stamps" they have. Again, your current skill set will dictate how you store this.

So think about how you are going to store the data, and work back from there.
 
Share this answer
 
Comments
Member 13734064 20-Mar-18 0:51am    
Thanks :)
OriginalGriff 20-Mar-18 5:28am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900