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

How to code shopping cart functionality?

Can anyone point me to a tutorial anywhere on the web that covers how to code shopping cart functionality that connects to paypal using PHP, preferably?Would it be even worth it to learn how to manually do this, or is it common practice to use plugins or other services? (note: the site I am working on will not be a wordpress environment.)

3 Answers

Matt Campbell
Matt Campbell
9,767 Points

Do the PHP track. It's all about building a store.

Thanks, I have already completed that track. What I am looking for is how to code the persistant shopping cart, instead of paypal doing the cart.

Matt Campbell
Matt Campbell
9,767 Points

There's quite a lot that goes into a shopping cart, you got to think about the checkout and the user profile that goes with it.

You'd probably be better off getting an existing cart and learning it inside out.

I've chosen WooCommerce as I develop WordPress sites. Over the last month or two, I've ripped it apart several times and worked out exactly how it does things.

I'm getting to a point where I can develop plugins for it and extend existing plugins such as the WooCommerce Pre-Order plugin that doesn't allow variable products variation to be pre-ordered. I'm not far off being comfortable enough to add this functionality. Just waiting on the new Plugin track here to gain some more knowledge.

It kind of falls under the whole, why build a CMS when there's already a lot of perfectly good open source options.