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

General Discussion

Kyle Bilton
Kyle Bilton
7,111 Points

How do I add a shopping cart to my website?

So I'm pretty good with HTML & CSS and have beginner - intermediate knowledge with javascript/jquery/php. Im looking to keep moving forward, what programming languages do I need to learn in order to create and add shopping carts and pay functions to my websites? Im becoming very confused from the outside word that is google when trying to find the answer, is it common practice to simply use ecommerce sites like shopify & woocommerce?

Long Q, i know, but could really use the help and guidance as I'm slowly losing the plot in trying to understand where to go next. Thanks :)

3 Answers

Samuel Ferree
Samuel Ferree
31,722 Points

If all you need is a basic shopping cart, then it's usually a good idea to use an ecommerce site or plugin.

However, if your goal is to learn how to make a shopping cart system then you need to dive deeper into your server side language (looks like you've started php), and client side scripting (javascript). It's a big ordeal so it will also be handy to get some information on how databases work, and security (authentication, authorization, cookies, encryption, etc.) since your customers will be entering payment information.

Also don't forget, that's just the customer facing end to get the orders. You'll want something for yourself to see and fulfill the orders.

Because there's a lot to consider, many people choose a third party plugin/site. However, if you're looking to increase your skills as a web developer, a shopping cart is a great project that will push you to develop a deeper understand of all the skills needed.

Kyle Bilton
Kyle Bilton
7,111 Points

I just want to be able to make a small online store selling 1-10 things for a few friends websites, so perhaps I should look at a plugin.

I'm always wanting to learn and upgrade my skills so maybe its a project i can start working on. I might try some of treehouses PHP & SQL courses, hopefully they'll have the information I'm after.

Can I ask though, i checked some web dev companies around my area and checked out their clients websites, it seems as though most if not all are built via third party sites, is it not common practice for these development agencies to custom build online stores, is it all about the quick turn around?

Not sure if you can answer that one^^

Thank you very much for your response though, this has already pointed me in a better direction.

Samuel Ferree
Samuel Ferree
31,722 Points

Very rarely is a shopping cart system built from scratch for a purpose other than education. Even if you wanted something super customized, it's almost always better to start with some open source thing, and then modify it to suit your needs.

That is true of almost any concept in software, with the exception of javascript frameworks.

Kyle Bilton
Kyle Bilton
7,111 Points

Yer I'm beginning to see why that is now, building a shopping cart system from scratch is no easy task. I just finished the "Wordpress Basics" course, and I'm already getting a better understanding on why and when to use Wordpress or ecommmerce sites and plugins, and when to build from scratch.

I guess I'm also trying to understand exactly what the average "Web Developers" role and job within a company can involve, but I suppose that can be a numerous amount of things depending on what the company sells and languages they require. Time for some googling and blog searching I think.

I'm going to dive deeper into PHP shortly, hopefully this will cement some more things and also up my skills into doing what it is I want to do; small website development.

Thanks again Samuel.