complete php order form with discount code check

Completed Posted Nov 27, 2012 Paid on delivery
Completed Paid on delivery

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

Project ID: #3988794

About the project

20 proposals Remote project Active Dec 1, 2012

Awarded to:

dzmitrij

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

$50 USD in 3 days
(69 Reviews)
5.9

20 freelancers are bidding on average $72 for this job

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 More

$200 USD in 5 days
(919 Reviews)
8.7
FASTGuru

hi sir! please read pm. thanks...

$60 USD in 2 days
(228 Reviews)
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 in 2 days
(117 Reviews)
8.0
gopalvora

ready to start Thanks

$100 USD in 5 days
(525 Reviews)
8.5
csajit

Lets get it done!

$60 USD in 2 days
(276 Reviews)
6.8
kssoftphp

I am ready and expert in PHP.

$45 USD in 1 day
(93 Reviews)
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 in 1 day
(78 Reviews)
6.2
sixbt

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

$50 USD in 1 day
(24 Reviews)
5.2
vios

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

$68 USD in 0 days
(13 Reviews)
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 More

$90 USD in 5 days
(20 Reviews)
4.5
LogikaKita

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

$50 USD in 3 days
(32 Reviews)
4.5
twr1965

Please see pm

$60 USD in 0 days
(9 Reviews)
4.5
webisyours0602

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

$150 USD in 0 days
(7 Reviews)
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 in 1 day
(1 Review)
2.1
gursahib03

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

$55 USD in 4 days
(2 Reviews)
1.0
tpetrov92

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

$45 USD in 2 days
(0 Reviews)
1.8
ashokjalondhara

ready to work

$75 USD in 7 days
(0 Reviews)
0.0