spree-contrib / spree_print_invoice

Create a PDF invoice for Spree orders.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
91 stars 239 forks source link

Asset url #70

Closed paulhuisman closed 9 years ago

paulhuisman commented 9 years ago

Hi futhr,

Nice work on this gem! I was trying to add the following to your _print.pdf.prawn template:

image asset_url 'logo.svg' , :at => [0,720], :scale => logo_scale

But i get a "image not found", while the url (http://localhost:3000/assets/logo.svg) actually exist.

Do you know how to add this image?

peterberkenbosch commented 9 years ago

Try assets/images

Sent from my iPhone

On 02 Mar 2015, at 11:35, Paul Huisman notifications@github.com wrote:

Hi futhr,

Nice work on this gem! I was trying to add the following to your _print.pdf.prawn template:

im = asset_url 'logo.svg' image im , :at => [0,720], :scale => logo_scale

But i get a "image not found", while the url (http://localhost:3000/assets/logo.svg) actually exist.

— Reply to this email directly or view it on GitHub.

paulhuisman commented 9 years ago

Solved it with using the correct method name:

Spree::PrintInvoice::Config.set(print_invoice_logo_path: 'logo.jpg' )

In the documentation it shows the wrong method name, 'logo_path'

peterberkenbosch commented 9 years ago

Not sure how that should actually work? What branch are you using? It's logo_path on 3-0-stable

paulhuisman commented 9 years ago

Ah, my bad.. was looking at the wrong README. I'm on 2-3-stable. Sorry!