This extension provides a "Print Invoice" button on the Admin Orders view screen which opens a printable html page with the order details.
Try Spree Html Invoice for Spree 3-1 with direct deployment on Heroku:
Try Spree Html Invoice for Spree 3-4 with direct deployment on Heroku:
Try Spree Html Invoice for Spree 4-1 with direct deployment on Heroku:
- Add this extension to your Gemfile with this line:
gem 'spree_html_invoice', git: 'https://github.com/vinsol-spree-contrib/spree-html-invoice', branch: 'master'
gem 'spree_html_invoice', git: 'https://github.com/vinsol-spree-contrib/spree-html-invoice', branch: 'X-X-stable'
The branch
option is important: it must match the version of Spree you're using.
For example, use 3-0-stable
if you're using Spree 3-0-stable
or any 3.0.x
version.
- Install the gem using Bundler:
bundle install
- Configure your logo and footer text or more. It's easy as it's html.
-
Set the logo path preference to include your store / company logo.
Spree::HtmlInvoice::Config.set(html_invoice_logo_path: <"company-logo.png">)
Somewhere in your asset path
-
Override any of the partial templates. they are address, footer, totals, header, thanks , and the line_items. The whole tanks is wrapped in a thanks hook, so replace or add at will.
-
Set
Spree::HtmlInvoice::Config.set(:suppress_anonymous_address)
option to get blank addresses for anonymous email addresses (as created by my spree_last_address extension for empty/unknown user info) -
Enable packaging slips, by setting
Spree::HtmlInvoice::Config.set(print_buttons: "invoice,packaging_slip") #comma separated list
Use above feature for your own template if you want. For each button_name, define a subsection with header, print, and thanks, in your locale.
Contributions welcome
For Building Dependencies:
appraisal install
The dummy app can be regenerated by using:
appraisal spree-3-1 rake test_app
This will run rake test_app using the dependencies configured for Spree 3.1. Similarly you can use spree-3-2 and spree-master for generating dummy applications using dependencies for Spree 3.2 and latest version of Spree
appraisal spree-3-1 rspec
This will run rspec using the dependencies configured for Spree 3.1. Similarly you can use spree-3-2 and spree-master to run rspec using dependencies for Spree 3.2 and latest version of Spree
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rspec spec
- Fork the repo.
- Clone your repo.
- Run
bundle install
. - Run
bundle exec rake test_app
to create the test application inspec/test_app
. - Make your changes.
- Ensure specs pass by running
bundle exec rspec spec
. - Submit your pull request.