Download the PHP package lenvanessen/commerce-invoices without Composer

On this page you can find all versions of the php package lenvanessen/commerce-invoices. 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 commerce-invoices

Commerce Invoices plugin for Craft CMS 3.x

Craft Commerce is great! Their PDF system is pretty awesome to. However, pdf of a does not equal an invoice, invoices should be: Immutable and sequentially numbered.

Commerce Invoices is an extension for Craft Commerce that allows you to:

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require lenvanessen/commerce-invoices
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Commerce Invoices.

Configuring Commerce Invoices

Setting up e-mails & PDFs

This extension integrates nicely with Craft's built-in system for Commerce E-mails and PDFs. However, there is a slight deviation. Normally, you'd trigger an email by assigning it to a specific order status. If you want the PDF of an invoice to be attached, this will not work like this. This is due to the fact that one order can contain multiple Invoices, and Multiple Credit Invoices. So just because the order reaches a status, doesn't mean the plugin knows what pdf you want sent to the customer.

The same principle applies to Craft's native PDFs. You can create PDFs from Crafts internal system, but they only get the order variable and are linked to a specific order, not to an invoice or credit invoice. For this reason, we don't assign a native PDF to the e-mail we're about to create, it will be added automatically.

The correct set-up is as follows:

  1. Go to Craft Commerce and create a new e-mail. You can assign a PDF, as long as it's not the pdf for the invoice (which you shoundn't have created anyways;)
  2. Go to Invoices > Settings and select the newly created email. While your here, you can also select the PDF template for the invoice.
  3. Done;)

Building the invoice PDF

You can easily check a preview of the invoice by navigation to: https://yourlocaltest.dev/commerce-invoices/style-pdf

By passing a specific invoice id you can test certain invoices, using the query parameter ?invoiceId={ID}. This is useful if you want to test a specific scenario or have problems with specific invoices. It's not necessary, you can also leave it blank and it will get the last invoice.

The only condition is that your site is not in production mode. You can also find a example PDF in the sourcecode of this extension, under templates.

Commerce Invoices Roadmap

Some things to do, and ideas for potential features:

Brought to you by Len van Essen

Icons made by Pixel perfect from www.flaticon.com

All versions of commerce-invoices with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0
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 lenvanessen/commerce-invoices contains the following files

Loading the files please wait ....