Got In A Fix

Hi All

I am a total beginner in PHP having used a few scripts (from knowledgeable people online) for validating contact forms up until now, THEN

A BOMBSHELL :o

A client of mine ( I create websites for small businesses ) wanted a basic website to get an order sent to him via the internet. This I duly created and for sometime there was no movement on the site, and the client, even after several prompts, did not want to move forward on it, so it remained in a state of limbo for 6-8months.

Then out of the blue this BOMBSHELL. They want the site up and running quickly AND to take payment online via PAYPAL from the original order form.

The order form contains a small number of products and asks for a quantity required for each and emails the content to contact details input at the bottom of the form.

The basic layout of the form is attached in lcfo-help-html.txt

What I am looking to do is:

Take the input of each quantity, validate it and then calculate the value of the line-item to be displayed on an updated form. This to be initial action (via update button) and repeated until user happy with order, cost and details.
The number of units counted and one of three delivery options selected based on the total units ordered.
Once customer is happy they then submit the order which initiates
[ul][li]A return to the order form with necessary error messages to correct input[/li]
[li]If all ok then the sequence of events will be[list]
[li]Payment via paypal first and foremost[/li]
[li]A copy of the order to the company to process[/li]
[li]A copy of the order to the customer for records[/li]
[/list][/li][/ul]

Then the customer is returned to the thankyou page on the website.
If anyone can help, I would be very grateful
As this customer is a good customer and I would like to retain his patronage.

Thanks in advance
Regards
Prometheus1618
PS I am looking for a good online course in php, if anyone knows of such a beast
Thankyou


lcfo-help-html.txt (3.12 KB)

What you’re asking for is what most shopping cart programs do. I don’t think anyone on here will code all of that for you, it’s a lot of work.

But since you seem to have some knowledge building websites, here’s the best thing you can do to get this accomplished.

Go to a few open source e-commerce sites and download the project and go through their code and see how they implement it.

OsCommence, Magento and countless others all in PHP with open source.

Paypal has a whole programming guide in which you have to pass all the information to them, It’s easy to add a button to pay a total amount, but with most company if they are paying with paypal, they want the items all itemized in paypal as well just not a total amount.

Paypal also has a development system called “Paypal Sandbox” in which you can test everything out in.

hi Topcoder
thank you for the reply

I feel that an ecommerce site for just one page is a bit overkill, but thank you for your suggestions.

Prometheus1618

^^ Agreed.

You’re looking to do an e-commerce type website. Suggestion? Use something readily available rather than script it yourself. If you’re adamant on scripting it yourself, go give yourself a head ache learning the PayPal IPN lol. Took me a while to figure it out!

OK

I think I am going for gold (doing it myself and WHEN successful, I will post the results for others to follow if they wish :wink: ), but can I ask for help to achieve php based information.

First request

How does one pass a pass an html value to php to calculate a value on the same page and then pass it back.

e.g

<?php $cheese_cost_1 = $_POST ['qty_cheese_1'] * 0.40; ?>

More formatting html

<?php print $cheese_cost_1; ?>

Is this good to go OR?

Thanks in advance
Prometheus1618 :-[

You’ll need to test it to make sure it contains a value…

[php]if isset($_POST [‘qty_cheese_1’]) {
$cheese_cost_1 = $_POST [‘qty_cheese_1’] * 0.40;
}[/php]

Thank you Topcoder

That will keep me going for a short while BUT

I'LL BE BACK
(accompanied by Terminator theme :D)

Prometheus1618

Sponsor our Newsletter | Privacy Policy | Terms of Service