Code Monkey home page Code Monkey logo

spree-print-invoice's Introduction

SUMMARY

This extension provides a "Print Invoice" button on the Admin Orders view screen which generates a PDF of the order details.

NOTE: Master branch should work with Spree 0.60.x + Deface

INSTALLATION

  1. The gem relies only on the prawn gem, to install you need to add the following lines to your Gemfile

    gem 'spree_print_invoice' , :git => 'git://github.com/romul/spree-print-invoice.git'

  2. run bundler

    bundle install

  3. Install wkhtmltopdf

  4. Add the following line to your application.rb

    config.middleware.use PDFKit::Middleware, {}, :only => %r[.*?/print]

  5. Enjoy!

Configuration

  1. Set the logo path preference to include your store / company logo.

    Spree::Config.set(:print_invoice_logo_path => "/company-logo.png")

  2. Override any of the partial templates.

  3. 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)

  4. Enable packaging slips, by setting

Spree::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 button_name_print text in your locale.

spree-print-invoice's People

Contributors

bdq avatar jumph4x avatar romul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.