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

Filipe Pacheco
seal-mask
.a{fill-rule:evenodd;}techdegree
Filipe Pacheco
Full Stack JavaScript Techdegree Student 21,416 Points

PHP ecommerce

Hi everyone,

I'm planning to create an online store with php from what I've been learning here. I just have a question. What would be the best way to build it? From scratch, writing everything, or should I use a framework? What would be the best framework for that?

It's an store that sells about 6 different categories products, will start with about 50 products and will grow as time goes. I would like to offer credit card and paypal payment, as well as an option for the user to create an account, pay a certain amount monthly and get discounts on all products.

Thanks in advance.

3 Answers

Daniel Pérez
Daniel Pérez
13,402 Points

Hello Filipe,

You can also use a tool specialized for ecommerce sites, like Wordpress and the woocommerce plugin, or another CMS (Content Management System) like Magento. Both written in PHP, so you can extend the functionality if needed. You can find some interesting courses about Wordpress and woocommerce here in treehouse.

Filipe Pacheco
seal-mask
.a{fill-rule:evenodd;}techdegree
Filipe Pacheco
Full Stack JavaScript Techdegree Student 21,416 Points

Hi Daniel, thank you for your input. I've already developed a few websites with wordpress and woocommerce, but I was planning on building something more code oriented, since I don't need to touch much of the code for such a website when using wordpress. The reason for this is to practice more php and add something involving more coding to my portfolio. So I would still like to try a different option.

I think Treehouse teaches you about ecommerce with PHP. Perhaps looking at the PHP library. Maybe they deleted it not too sure :)

Joel Bardsley
Joel Bardsley
31,249 Points

Ethan is correct, there used to be a php course that covered basic ecommerce using paypal for the shopping cart and checkout, but I think that got the boot during one of the php revisions on treehouse.

A while ago I came across this video on YouTube that introduced me to Moltin - an ecommerce API that you can hook into your own application. The video uses JavaScript and he does a more in-depth video using Angular, but you can use PHP for it instead if you prefer. I used to work on Prestashop sites (a CMS like Magento) but I think my next ecommerce project will be using Moltin.