Download the PHP package kennethormandy/craft-marketplace without Composer

On this page you can find all versions of the php package kennethormandy/craft-marketplace. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-marketplace

Marketplace for Craft Commerce

Make your Craft ecommerce site into a Marketplace: add payees to products, charge a fee for your platform, and handle payouts automatically via Stripe Connect.

Marketplace Lite for Craft Commerce Lite now available!

Features

Documentation

  1. Install
  2. Configure
    • Create a Stripe Connect app
    • OAuth 2.0 Client
    • Redirect from Stripe to Craft CMS
    • Configure Marketplace for Craft Commerce
  3. Add Marketplace fields
  4. General use
    • Add a new user
    • Add the User as a Payee on a Product
    • Add a Fee for your platform
    • Customize the Buy Template
  5. Advanced use
    • Events
    • Craft Commerce Pro

Install

To use Marketplace, you will need:

To start, install:

You can install the plugins through the Craft CMS dashboard, or using the command line:

Configure

If you haven’t already, you’ll also need to create a new Stripe Connect application while in Test mode in your Stripe Dashboard.

Create a Stripe Connect app

When you are ready to go to production, you’ll need to do this again with your Stripe Dashboard set to Live mode.

Now, you can configure the OAuth Client plugin to use with your new Stripe Connect settings.

OAuth 2.0 Client

Register a new OAuth App:

FieldValueNotes
NameStripe Connect…or whatever name you’d like
HandlestripeConnect…or whatever name you’d like
ProviderStripe Connect Express
Client IDEx. ca_AaBbCc…Your Stripe Connect Client ID, from the Stripe Connect settings in the Stripe Dashboard.
Client SecretEx. sk_AaBbCc… or sk_test_AaBbCc…Your regular Stripe Secret Key from the Stripe Dashboard.

You’ll probably want to make your Stripe Connect Client ID and your Stripe Secret Key into environment variables. Then, you can easily switch from Stripe Test keys to Live keys, depending on the environment.

Redirect from Stripe to Craft CMS

After saving your OAuth App, copy the Redirect URI from the “Setup Info.” You’ll want to add this to your Stripe Connect settings in the Stripe Dashboard. At the time of writing, this is stored in the Stripe Dashboard under: Settings → Connect settings → Integration.

Now, Stripe will be able to redirect sellers on your platform back to Craft CMS after saving their Stripe details.

Configure Marketplace for Craft Commerce

Now that your OAuth App has been created, you can select it as the app to use, in the Marketplace for Craft Commerce settings. You’ll also need to fill in your Stripe Secret Key here too.

You can also set up a Fee now, or leave it blank. This is described later in Add a Fee

Add Marketplace fields

Marketplace contains two new fields for you to use:

You’ll want to create a new Marketplace Payee field, and add it as a new field on the relevant Product Types.

For example, using the Clothing products that come with a fresh Craft Commerce install, you’d add the field to Commerce → System Settings → Product Types → Clothing → Product Fields:

You’ll also want to create a new Marketplace Connect Button field, and add it as a new field for Users. For example:

General use

At this point, everything necessary has been configured. The following example will use the default Craft Commerce products to finish setting up the site with Payees, a fee that the Platform charges, and some optional modifications to the default Craft Commerce Twig templates.

Add a new user

Minimum necessary permissions:

Login as that user (When you connect accounts, right now the associated token is always based on the logged in user account, rather than the profile of the person you are looking at. ie. you have to “Login as user” to test connecting their account, and you shouldn’t be able to see this field (or it should be disabled) unless you are looking at your own profile).

Add the User as a Payee on a Product

Let’s imagine this new user makes one of the Clothing Product we have on our store, and we want them to be paid for it. Now, we can go to that Product, and set them as the Payee:

Add a Fee for your platform

Marketplace Lite allows you to configure a single flat-rate or percentage fee, inclusive of the customer’s total.

Customize the Buy Template

Everything is configured! If you have filled in some content and have:

…you can run through test purchases and see the results in your Stripe dashboard.

Your Craft Commerce templates don’t require any modifications to handle this, but depending on the kind of store or marketplace your are running, you might decide to make some. For example, you might show the Payee to the end cusomter. Imagine “Jane Example” designed “The Last Knee-High” product that comes pre-filled on Craft Commerce, and you want to show them in the default Craft Commerce buy templates:

The templates stored in example-templates in this repository are the minimum changes to use Marketplace with a default Craft Commerce install. The template changes are only to switch from using the Dummy Payment Gateway, from the default install, to Stripe, and to show the customer who the Payee is, which is optional.

As long as you’re using the Stripe Payment Gateway already, none of these changes are required to use Marketplace.

Advanced use

Events

Craft Commerce Pro

Marketplace Lite pairs with Craft Commerce Lite’s single line item orders. If you are using Craft Commerce Pro, and your user interface limits customers to single line item orders (ex. a “Buy now” button with no cart), it will work equally well for you.

Marketplace Lite also includes support for Craft Commerce Pro and orders with multiple line items, when all line items have the same payee.

If you’re interested in more comprehensive payment splitting for items in carts, Marketplace Pro will pair with Craft Commerce Pro, and is in stable beta. Feel free to send me an email if you’re interested in previewing it for your project. It can be installed immediately.


All versions of craft-marketplace with dependencies

PHP Build Version
Package Version
Requires kennethormandy/oauth2-stripe Version ^2.1
craftcms/cms Version ^3.4.20
craftcms/commerce Version ^3.1
stripe/stripe-php Version >=6.1
venveo/craft-oauthclient Version ^2.1.7
putyourlightson/craft-log-to-file Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kennethormandy/craft-marketplace contains the following files

Loading the files please wait ....