| You are here: Home > Scripts > PHP Free Shopping Cart Scripts > PHP Simple Shopping Cart Script |
| ||||||||||||||||||||
Back to Shopping CartSimple Shopping Cart Software(Requirements: PHP and a MyPaySystems merchant account)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. 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:
Adding taxes What about taxes? Myself personally I set the taxes BEFORE sending it to the credit card processing. Easier to code and manage. 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. References: myPaySystems Frequently Asked Questions |
|
contact us: elouai@gmail.com ©2003-2009 eLouai.com, All rights reserved |