Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

sebastian rojas
sebastian rojas
571 Points

Shop cart help!

Hey!

Im building a website for a school project now and would like to get some help with a shopping cart so if you know a good guide or such i would appreciate to see it! :)

6 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

Did you watch the PHP Simple application videos? Just use PayPal unless you want to make your project harder than it needs to be. http://teamtreehouse.com/library/build-a-simple-php-application

Or do you need to actually create your own shopping cart the will integrate with other payment systems?

sebastian rojas
sebastian rojas
571 Points

Well it's a work for my exam so i think i need to make it abit more harder :P

So this is how i want it:

Make a button to go from different categories in my store for example "motherboards" and there i will have some products and click on them for more information and then choose quantity and then "add to cart" etc the payment does not need to work since its only a examination work! :) but should be able to choose between different cards like visa, mastercard etc and fill in forms for the information etc

sebastian rojas
sebastian rojas
571 Points

I might have found a good shopping cart

http://www.qualitycodes.com/tutorial.php?articleid=25&title=Tutorial-Building-a-shopping-cart-in-PHP.

but then im not quiet sure how the heck i will be able to get it into my website i have atm

Andrew McCormick
Andrew McCormick
17,730 Points

check out the videos on mySQL and PHP http://teamtreehouse.com/library/using-php-with-mysql They talk about creating the database for the products, etc in those videos. Once you understand connecting mySQL and PHP, adding the shopping cart you linked to in to your current site (no matter how basic) shouldn't be to hard.

sebastian rojas
sebastian rojas
571 Points

So through mySQL i will be able to create categories and add products? if you know what i mean?

I remember the first project I had to do thats 2 years ago was an ecommerce shop. I watched this series and picked few things from it at that time. Although thinking about it , the code could be refactored so much but i hope it will help you to kick start your project. the link is http://www.youtube.com/watch?v=65gV8JOgWkQ

Matthew Dobson
Matthew Dobson
3,797 Points

I have the same issue, Im a Front end developer being sucked into back end development through the Diploma of Website Development at Tafe in Australia. Treehouse is a far superior, faster and simpler way of learning than the dribble that this and some other institutions serve up. However Treehouse is lacking in that to be actually qualified in these fields one needs to know more than just how to "Plug in" Paypal.. We are also required to develop our own cart that then checks out through Paypal (not a link directly to the Paypal Cart). The skills in doing so are invaluable, even though in my chosen path at the "Front End" of a website and Wordpress Id never play around with such a thing, I think it would be a more thorough outcome if Team treehouse included it when developing projects such as "Shirts4Mike" as I wouldnt find just checking out straight to Paypal acceptable for some clients sites.