PHPackages                             elefant/app-products - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. elefant/app-products

ActiveElefant-app[Utility &amp; Helpers](/categories/utility)

elefant/app-products
====================

A reusable, embeddable products component for the Elefant CMS

1.0.0(11y ago)235MITJavaScript

Since Sep 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jbroadway/products)[ Packagist](https://packagist.org/packages/elefant/app-products)[ RSS](/packages/elefant-app-products/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Products is a simple shopping cart for the Elefant CMS
======================================================

[](#products-is-a-simple-shopping-cart-for-the-elefant-cms)

**Status: Beta**

This app provides a simple shopping cart for the Elefant CMS, with sales handled through the [Stripe Payments](https://github.com/jbroadway/stripe) app.

Current features
----------------

[](#current-features)

- Shopping cart
- Basic inventory tracking
- Configurable taxes
- Shipping fees with max amount and "free over $x" settings
- Digital downloads
- Stripe payment processing
- Basic order management
- Discounts and "invoice me" payment option [available via callbacks](#callbacks-for-discounts-and-invoice-me-payment-option)

Features yet to be added
------------------------

[](#features-yet-to-be-added)

- Admin sales dashboard
- Inventory running low/out admin notifications
- Shipment tracking
- Promo codes

Installation
------------

[](#installation)

First, you will need to install the [Stripe Payments](https://github.com/jbroadway/stripe) app.

Once you've installed that, the easiest way to install the app is:

1. Log into Elefant as a site admin
2. Go to Tools &gt; Designer &gt; Install App/Theme
3. Paste the following link and click Install:

```
https://github.com/jbroadway/products/archive/master.zip

```

Alternately, you can run the following from the command line:

```
cd /path/to/your/site
./elefant install https://github.com/jbroadway/products/archive/master.zip
```

Usage
-----

[](#usage)

### Configure the app

[](#configure-the-app)

In the Elefant admin area, go to Tools &gt; Products &gt; Settings to customize the app for your site. Also visit Tools &gt; Products &gt; Taxes and Tools &gt; Products &gt; Categories to set up your taxes and product categories.

### Adding the products page to your site

[](#adding-the-products-page-to-your-site)

In the Elefant admin area, go to Tools &gt; Navigation and drag the "Products" page into your site tree. Note that if you've renamed the page in the Products app settings, the page will be renamed in the site navigation as well.

### Callbacks for discounts and "invoice me" payment option

[](#callbacks-for-discounts-and-invoice-me-payment-option)

The following settings can be set in your `conf/app.products.config.php` configuration file like this:

```
; A callback to check for available discounts for the current user's
; membership type, specified as a percentage discount.
discount_callback = "\myapp\Callbacks::discount"

; A callback to check whether an "invoice me" option should be available
; for payments. The site owner will receive an email of the order that
; they will manually invoice for.
allow_invoice_callback = "\myapp\Callbacks::allow_invoice"
```

Here is an example class that implements basic examples of callbacks for the two settings:

```
