Oh Yea WordPress fun, lol.
I have been working with WordPress for about 8 or so months now. I started with zero experience with WordPress, saying that because it is not hard to learn just a pain in the butt to use sometimes.
- Is it in general possible to use WordPress and WooCommerce for a project like this?
Sure, there are tons of sites that use that for their shopping carts, etc.
- How can i handle authentication and the "membership webshop" in WordPress / WooCommerce?
Options, 1) use the WordPress login, 2) use Laravel auth.
I think your going to be required to use the WordPress login for the WordPress stuff, now, you could setup a custom login plugin that would check the WordPress login and if it fails then try the Laravel and then if that fails then treat it as a bad login. I wouldn’t do two separate login systems, that would be come very hard to manage later on. I would look at maybe a duel system, where it logins in to both WordPress and Laravel, would just have to figure out how. You could hook in to the account creation an do a api call to Laravel that creates the duplicate user in that system. Then a custom login could login to WordPress, and Laravel at the same time. You would also have to tie in to the password reset stuff.
- Should I try to convince the customer that we build everything from scratch in Laravel, although he really wants to go with WordPress?
If you want too. But you will need to consider the time needed if writing most everything from scratch (or packages maybe) vs using WordPress and WooCommerce.
- Should I try to figure out some crazy way to use both, WordPress and Laravel? (e.g. using WordPress for the static pages, handling the webshop in Laravel. But how can the shop admin than manage products and all that..)
I think this would be possible. You can run Laravel in a subdir on the WordPress site, then just modify the WordPress routes to direct the request to the Laravel page. I have some code that I used to overwrite the WordPress routes, so I can find that if you decide to go that route. It would take some tweaking to get it all set up but I am doing something similar in WordPress, just not to Laravel.
The alternative would be to run WordPress in the subdir, and the main site would be Laravel. Then you could just use WordPress as an admin interface. You can use (or make) an api to access the data in the WordPress installation. It’s possible, the question is if it’s worth the trouble.
- a plain WordPress installation with the WooCommerce shop plugin. only used by the clients admin, to create static pages (provide the content) and WooCommerce products
Yes, this is what I would think of in the process.
- a Laravel installation which pulls all the static pages content and product data from the WordPress API
Two ways to do this, you can either include the main WordPress class then use the WordPress functions to get products, coupons, handle the shopping cart calculations, etc. I don’t remember any api that directly accesses the products, but there might be, if not you can write one in maybe a few lines of code. I think I may have some examples of that as well.
- all the frontend stuff (design, ux) for the static pages as well as
Yes, you can make a custom theme that you can use git to keep in sync. Same with the custom plugins, you can use git on them too.
- the whole shop implementation (cart, checkout pages, etc) is built in Laravel?
This is the tricky part. You could do all of that in Laravel, but it might be simpler to just use WordPress since it would already be built in and you would only need to make the page templates.
I am a big fan of Laravel, but sometimes there is just not a way to work in using it on some projects. You would need to ask yourself, what am I using Laravel to do and is that the most efficient way or would just writing a plugin to WordPress and a custom theme (aka templates) be better.
- would be possible to visit some weird, not styled WordPress pages (or at least the WordPress index page) on that WordPress installation?
Not a big problem, since you can overwrite the router in WordPress relatively easily. However, it could make the admin management the pages in WordPress a bit tricky.
--
Hope that helps.
(really need a markdown preview... lol)