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

Tata Cheng
Tata Cheng
8,787 Points

What language can be used for this type of website?

Hi!

I'm currently working on the PHP learning adventure, and a question came to mind. What if I want to add a function where customers of an e-commerce website can sign-up and view their order details, history, etc? Can that be done by PHP? Wordpress? I'm a bit confused about that, it seems pretty complex at this point.

Will Treehouse be looking into this down the track?

2 Answers

Christopher Warren
Christopher Warren
17,640 Points

Yes you can do that. Wordpress is a content management system, where PHP is a server side language.

Kevin Korte
Kevin Korte
28,149 Points

Absolutely can be done in PHP. It could even be done in Wordpress. I'm not sure you'll find a plugin that will do exactly what you want, so you may have to write your own plug in to do it.

But can it be done in PHP, and even Wordpress? Absolutely.

Will is be pretty advance to code this up yourself? Absolutely.

In essence though, you're going to have to in some fashion build onto wordpress's database, so when a user signs up, their info and some identifier about them is stored into the database. When they make a purchase, that purchase and all of it's details will have to be logged into a database, and a relationship between that order, and that user will need to be made. To show the user their order details, history, etc, your PHP code will need to query the database for any orders that user has logged in the database. That information will be return to PHP, and than it'll have to pass that info to the client to show.

You'll need to know a lot about PHP, and a database like MySQL and how to create relationships, query it, and how to make PHP interact with a database. And than sprinkle in some security concerns to prevent people from highjacking your database and customer information through the PHP code that interacts with it.

Tata Cheng
Tata Cheng
8,787 Points

Hmm, I've got a long road ahead of me... Thanks for your reply, I've got a better idea of the process that it takes to do it now :)