PHPackages                             offline/oc-microcart-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. offline/oc-microcart-plugin

ActiveOctober-plugin[Framework](/categories/framework)

offline/oc-microcart-plugin
===========================

Simple shopping cart for October CMS

v1.1.2(4y ago)172812MITPHP

Since Aug 2Pushed 4y ago3 watchersCompare

[ Source](https://github.com/OFFLINE-GmbH/oc-microcart-plugin)[ Packagist](https://packagist.org/packages/offline/oc-microcart-plugin)[ RSS](/packages/offline-oc-microcart-plugin/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

oc-microcart-plugin
===================

[](#oc-microcart-plugin)

> The `OFFLINE.MicroCart` plugin aims to provide simple shopping cart and payment features.

This plugin is meant for projects where simple items are sold online (Tickets, Coupons, etc). You will have to implement the "item part" (like a `Ticket` model) yourself. You can use the plugin as cart and payment solution.

Features
--------

[](#features)

The `OFFLINE.MicroCart` plugin provides the following features:

- A `Cart` model with a nice API to add and remove `CartItems`
- A `Cart` component base, that is meant to be extended by you
- `Stripe`, `PayPal` and `SIX SaferPay` payment integrations
- Support to add custom payment gateways
- Numerous events for you to hook into

It **does not** provide any of these features:

- Product data management
- E-Mail notifications
- Multi currency support
- Stock management
- Shipping rules
- ... and lots of other extended eCommerce features

If you are looking for a fully featured eCommerce solution for October CMS check out [OFFLINE.Mall](https://github.com/OFFLINE-GmbH/oc-mall-plugin).

Getting up and running
----------------------

[](#getting-up-and-running)

### Create your own plugin that extends MicroCart

[](#create-your-own-plugin-that-extends-microcart)

The MicroCart plugin is meant to be extended by your own plugins. Refer to [the official October CMS docs](https://octobercms.com/docs/plugin/extending)for a list of all extension possibilities.

```
php artisan create:plugin YourVendor.PluginName
```

### Backend menu

[](#backend-menu)

The plugin does by default not register any backend menu items. You can use the following snippet in your own `Plugin.php` to use the default orders overview.

```
    public function registerNavigation()
    {
        return [
            'main-menu-item' => [
                'label'        => 'Your Plugin', // Your label
                'url'          => \Backend::url('offline/microcart/carts'),
                'iconSvg'      => 'plugins/offline/microcart/assets/icon.svg',
            ],
        ];
    }
```

### Cart component

[](#cart-component)

The plugin does not register any components but it provides you with a `Cart` base component that you can extend.

Simply register your own component and build from there.

```
php artisan create:component YourVendor.PluginName Cart
```

Register your component in your `Plugin.php`.

```
    public function registerComponents()
    {
        return [
            \YourVendor\YourPlugin\Components\Cart::class => 'cart',
        ];
    }
```

Make sure the component extends MicroCart's base component.

```
