complete php order form with discount code check

Ukończone Opublikowano Nov 27, 2012 Płatność przy odbiorze
Ukończone Płatność przy odbiorze

This is our initial position:

- there are two simple php files: php1 for an orderform, php2 for checking and confirmation

- php1 is an order form, where the customer can put in his address before ordering.

- there is also a field for "discount code". If the customer has a discount code, he can put it herein to get a discount.

- with a submit button, the php2 is called.

- php2 checks address data for completness.

- check is done with simple "if" queries

- if the address is incomplete, it goes back to order form

- if the address is ok, order will be sent

- discount code is checked manually

-----------------------------------------------------------

This is what we need:

- php3: discount code validation and mark discount code as obsolete

- at submitting the discount code must be validated

- additional we provide a "[login to view URL]" file, wich is edited manually.

- this is an example of [login to view URL]:

12345678901234;26.11.2012;24.11.2012

12374278901233;30.11.2012;25.11.2012

82345678421230;30.11.2012;

55345685671236;26.11.2012;

- [login to view URL]:

-- format is text/csv

-- seperator is semicolon ;

-- there is no header line

-- each line is one discount code

-- three fields: fields one/two are predefined, field three is controlled by php3

-- first field is the discount code, alphanumeric, up to 20 charcaters, no spaces

-- second field:expiry date; date format: [login to view URL]

-- third field: date of cashing the discount; date format: [login to view URL]

- validating with php3:

-- validating must be processed in a separate php3 file. php2 calls the new php3 as a function. php3 returns only true/false (valid/not valid).

-- so the only change in php2 is the new function call to php3 and if the check fail and additional error message.

-- new php3 function:

--- get the customer discount code from php2 as parameter

--- read each line in the csv file and compare with predefined discount codes with our customer discount code until it finds an exact match

--- discount code is only valid if:

---- predefined discount code matches complete with customer discount code (not case sensitive)

---- predefined discount code has same length than customer discount code

---- current date is less or equal than "expiry date" (second field in line)

---- third field in line (discount code) is empty

--- if the discount code is valid:

---- change [login to view URL]: php3 write current date in the line with the matched discount code as third field. This mark the discount code as obsolete

---- date format: [login to view URL]

---- return true to the calling program as valid discount code and end php3

- leave php1 unchanged

- complete php2:

-- this should the call in php2 look like i.e.:

--- if (php3($discountcode))

--- {

--- // current code for ordering; leave unchanged

--- }

--- else {

--- // new code: error message "discount code invalid"

--- }

PHP

Numer ID Projektu: #3988794

O projekcie

20 ofert Zdalny projekt Aktywny Dec 1, 2012

Przyznany użytkownikowi:

dzmitrij

Hi, I can make such task. I have experience working with php and csv. Regards. Dima

$50 USD w ciągu 3 dni
(69 ocen)
5.9

20 freelancerów złożyło ofertę za $72 w tym projekcie

gyaseen1986

We are experts in PHP Open Source (any kind of PHP/MySQL work), Javascript Framework (Jquery) and Ajax/Web 2.0 technology. Some of the projects we completed for php are mentioned below https://www.freelancer.com/pr Więcej

$200 USD w ciągu 5 dni
(919 Oceny)
8.7
FASTGuru

hi sir! please read pm. thanks...

$60 USD w ciągu 2 dni
(228 Oceny)
8.1
vipinmaru1990

Hello Hiring Manager, please visit your PMB for more details about my work ,skills and expertise. I have read your given core description of project at our best and will surely give better results.

$50 USD w ciągu 2 dni
(117 Oceny)
8.0
gopalvora

ready to start Thanks

$100 USD w ciągu 5 dni
(525 Oceny)
8.5
csajit

Lets get it done!

$60 USD w ciągu 2 dni
(276 Oceny)
6.8
kssoftphp

I am ready and expert in PHP.

$45 USD w ciągu 1 dnia
(93 Oceny)
6.9
noxtras

Hello, I can do this today, if you choose me. Why don't you use a database like mysql or sqlite (simple file, works on any server)? Let's talk and i'll help you optimize your checkout process.

$50 USD w ciągu 1 dnia
(78 Oceny)
6.2
sixbt

Hi! I can make this validation function quick & deliver high quality. Ready to start right away.

$50 USD w ciągu 1 dnia
(24 Oceny)
5.2
vios

Master of PHP here. Easy job, can finish in few hours, check review, will not disappoint!

$68 USD w ciągu 0 dni
(13 Oceny)
4.8
martinlynas

Hi - I'd love to work with you on this - I would like to use jquery/ajax to validate the discount code via a call to a php function- that way the page will not need to be reloaded if the discount code is invalid (whic Więcej

$90 USD w ciągu 5 dni
(20 Oceny)
4.5
LogikaKita

Very clear description! I will ready to make your php3. :)

$50 USD w ciągu 3 dni
(32 Oceny)
4.5
twr1965

Please see pm

$60 USD w ciągu 0 dni
(9 Oceny)
4.5
webisyours0602

I've read all your requirements and I'm confident to say that I can help you.

$150 USD w ciągu 0 dni
(7 Oceny)
3.9
kutchbhi

Your instruction and thorough and clear, which I have read and understood perfectly. I am confident about being able to do this. Please See PM for my background.

$55 USD w ciągu 1 dnia
(1 Ocena)
2.1
gursahib03

Sir am highly keen to complete this job within the specified deadline . Bring it on. Thanks..

$55 USD w ciągu 4 dni
(2 Oceny)
1.0
tpetrov92

Experienced PHP developer here. I can do the work in mean time.

$45 USD w ciągu 2 dni
(0 Oceny)
1.8
ashokjalondhara

ready to work

$75 USD w ciągu 7 dni
(0 Oceny)
0.0