Shopping Cart Script - BASIC

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gilligan
Forum Newbie
Posts: 3
Joined: Mon Feb 11, 2008 5:07 pm

Shopping Cart Script - BASIC

Post by Gilligan »

Let me just start out by saying that i have been to 4 other coding forum websites, and neither have been of any assistance to me.

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

1) I have a merchant account with SECPay
2) I have a MySQL Database
3) I have little PHP skills

The thing i want is REALLY basic.

I only need this so far for one product (costing £10). I would like to add this product to my database, then i would like for the user to buy this product and pay for it through SECPay.

I want it so the user clicks 'continue' (£10 multiplied by quantity is added to total), they then select their shipping (price is added on to total), they finally click 'go to payments' and are taken to secpay with their final price.

An example is below.

http://gks.890m.com/democart - Does not function (just an example)

i also have the form to take the user to the secpay page

Code: Select all

<form name="payment" method="POST" action="https://www.secpay.com/java-bin/ValCard" name="autosubmit">
<input type="hidden" name="callback" value="shopurl">
<input type="hidden" name="merchant" value="MerchantID">
<input type="hidden" name="trans_id" value="transaction id">
<input type="hidden" name="amount" value="total price">
<input type="submit" name="Submit" value="Go to payments">
</form>
All i need is a script that enables the EXTREMELY BASIC cart and also enables the points specified in red above.


Hope i explained this well enough.


Any help is appreciated.
Gilligan
Gilligan
Forum Newbie
Posts: 3
Joined: Mon Feb 11, 2008 5:07 pm

Re: Shopping Cart Script - BASIC

Post by Gilligan »

All sorted, a mate coded something for me, works perfectly. I will post the code when i get some time.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Shopping Cart Script - BASIC

Post by Christopher »

Make that five sites that have been no assistance to you! ;)
(#10850)
Gilligan
Forum Newbie
Posts: 3
Joined: Mon Feb 11, 2008 5:07 pm

Re: Shopping Cart Script - BASIC

Post by Gilligan »

Heres the code.

http://www.gks.890m.com/cart.zip

Unzip and read 'readme.txt'
Post Reply