You are here:   Home > Scripts > PHP Free Shopping Cart Scripts > PHP Simple Shopping Cart Script
What's
New
Doll
Makers
Room
Makers
Puzzle
Makers
Dress Up
Games
GirlSense - online dress up games for girls with fashion sense

Back to Shopping Cart

Simple Shopping Cart Software

(Requirements: PHP and a MyPaySystems merchant account)


Page 1 | Page 2



Customize Shopping Cart

We would to configure the amounts and the items we can add to our shopping cart. Below we extend our example to select an amount to donate.


Donate
Select Amount

Checkout
Total: $5

You can download the source of the example here:
Simple Shopping cart Source code.


Highlights to note:
The above script uses a form
..<form action="shopping-cart-software2.php" method="post">..

The form is meant to call itself passing a new 'amount' value. This value, 'amount', is updated in the drop down box, the 'Total:' label and the URL passed to MyPaySystems credit card processor. We use the method="post", to debug use method="get" to view the parameters that are passed.


Recurring fee

How to add a recurring fee?
The following attributes are important:
  • reoccur reoccur=Y, yes this fee is recurring
  • cycle cycle=30 for a monthly fee or cycle=365 for a yearly fee
  • totalperiod totalperiod=999, repeat for 999 months (if monthly schedule)
Donate
Select Amount
Pay Yearly
Pay Monthly

Checkout
Total: $5


Adding taxes

What about taxes?
Myself personally I set the taxes BEFORE sending it to the credit card processing. Easier to code and manage.

Donate
Select Amount
Pay Yearly
Pay Monthly
I live in Quebec (PST)
I live in Canada (GST)

Checkout
SubTotal:$5.00
GST:$0.00
PST:$0.00
Payable monthly:$5.00

The taxes are implemented by asking "I live in Quebec or I live in Canada", the taxes are then applied (recalculate) based on their answers.

Additionally you could rely on IP as a check for country location (99% accurate), should be used as a guide only. In my case, IP location would be incorrect since my IP pool would show the US instead of Canada.

Taxes can always be tricky to calculate, take for example Quebec
..
if ($tc==="on")
{
$gst = $totals*0.07;
if ($tq==="on") $pst = ($totals+$gst)*0.075;
}
..
The taxes are applied on TOP of the total plus the GST. In other words Quebecers are taxed on the taxes they pay as well as the subtotal :(.

You can download the source of the example above here:
Shopping cart Source code.


Conclusion

The wizard like shopping cart should be used BEFORE going to a convential shopping cart. The goal is always to simplify the buying process, collect as much information as is necessary to make a sale and no more, the more button clicks, screens and hoops the visitor has to jump through the less likely he would end up buying your product (especially true when dealing with impulse buying)

If you found this tutorial and examples useful, please credit the source. Thank you.


To sign up for PaySystems.com.
The process should take around 24-48 hours. Approval levels is over 99%.

Please note you would first need a website before you can get approved.

Page 1 | Page 2



References:
myPaySystems Frequently Asked Questions



About     Privacy Policy     Hosting by Web Hosting Canada

Except where otherwise noted, this site is licensed under a Creative Commons License



contact us: elouai@gmail.com
©2003-2008 eLouai.com, All rights reserved