<this article is Work In Progress. Screenshot / videos will be provided later on>
In this post I’ll discuss a hypothetical setup for a Marketplace. As it’s mainly used for educational purposes, I will over-simplify things. I mainly want to show how relatively easy it is to make such a platform (though it requires some technical skills) in Drupal.
Granted Drupal is extremely powerful (because of it’s granular nature) but you have to know the ins and outs a bit. Hence me documenting my process how one can map concepts to a Drupal implementation (which modules, configuration, … ).
So let’s say we want to create a Marketplace for Freelance Online Marketing Services using Drupal. So you probably have heard about those platforms like Fiverr, Upwork , …
You have a person that offers a Service, let’s call it ‘Seller’ and a (wo)man that NEEDS a services, a ‘Buyer’. Once they get in touch and work out a deal, the Seller can get to work and after the completion the buyer can pay him/her.
So we have some basic concepts
- People with a specific role: seller, buyer
- An assignment (which basically connects a Buyer with a Seller)
The actions that the platform should allow us to do is:
- Register as buyer or seller
- Login as buyer or seller
- As a buyer
- find a seller
- start a conversation & assignment
- As a platform administration
- build some reports (money transaction in a specific time frame)
Accounts & Profiles
Translated to Drupal: we can use the standard ‘out-of-the-box’ Account management enriched with Profile specific information.
Modules: Profile, Profile Reg Path
The Profile module will allow us to create ‘role’ specific fields.
The module “Profile Reg Path” will give you the possibility to have clean urls. Like e.g. https://<yourdomain>/register/seller or https://<yourdomain>/register/buyer
In your Drupal Administration Panel go to Configuration -> Profile Types -> Add profile type
The concept of assignment
An assignment can go through different phases: ‘conversational’ ‘negotiating’, ‘executing’, ‘completed’, ‘paid’
In Drupal it’s super easy to create a new content type. So this would be a new
In your Drupal Administration Panel go to Structure -> Content Types -> Add Content Type.
Here you can create your new Content Type. Here you can add as many field as you want. Fields like: assignment phase, price, is paid field, …
We use “Field Group” to combine fields that logically belong together.
The “Computed Field” module is used to auto-calculate fields. E.g. say we have a “price per hour” field and a “total nr of hours” field. It makes sense to have a field called e.g. “total price” which is a product of the previous two fields.
Modules: Computed Field, Field Group
Permissions
It’s very important to get the permissions right.
There are default permissions that are ok in a Blogging Platform context but not in a “MarketPlace” context.
Let me clarify this: if we publish a piece of content like e.g. an Article. Article is a known content type in Drupal, it’s ok that every field is visible to the public (once published): like Title, Description, Tags, Image.
Also there are permissions on different levels: on the People Level, Content Level, on the Field level, …
But for this project some fields need to be protected. Some fields will be private for a person. Like e.g. ‘personal notes’. Other fields are rather meant for the ‘system’ to make decisions.
Modules: Field Permissions
Drupal Rules
This is a very powerful piece in Drupal! I work a lot with WordPress websites and the moment you need some actions to happen under specific circumstances it’s get a bit tough. Sometimes you need to make a custom WordPress plugin to get the job done.
Module: Rules
Drupal Views
Views are extremely powerful to combine several pieces of information.
The combine power can be found under ‘RELATIONSHIPS’ in the Advanced section.
One can even build views based on the context the viewer is in. So if a seller is logged in he/she would see only data that is somehow connected to him/her.
This can be accomplished by using ‘CONTEXTUAL FILTERS’ under Advanced.
Recent Comments