We'd like to use VBO to bulk print Ubercart invoices. However, the bulk printed invoices are different to individually printed ones.

In the bulk printed invoices:

  • The logo is much larger
  • The logo's ALT attribute appears next to the logo instead
  • There seems to be some character-set mismatch, as the currency appears as "£" instead of "£".

Shouldn't VBO be using the same template?

(I've listed this as a bug report as that's what it seems to be, but I'm happy for it to be changed to a support request if I've misunderstood how VBO should work.)

Comments

bojanz’s picture

Project: Views Bulk Operations (VBO) » Ubercart
Component: Core » Code

This code lives in Ubercart, let's ask the maintainers.

Onein’s picture

Version: 7.x-3.2 » 7.x-3.8

OK, thanks. Updated for the Ubercart (rather than VBO) version.

Onein’s picture

Further investigation shows that it's using the theme uc-order--customer.tpl.php for printing individual invoices, and the default uc-order--customer.tpl.php for printing bulk invoices. (Having used "The Simplest Way" from https://www.drupal.org/node/1867700 to override the template.)

Even if we replace the default template in the Ubercart folder, we still don't get exactly the same results. For example, it still seems to be assuming that it's a different character set / encoding (as we're still getting "£" instead of "£").

I assume that's a bug, rather than a misconfiguration of some kind?

parkydrupal’s picture

how can I do bulk print? I am using 3.6 ver.

thanks

jeepster’s picture

Onein, did you find the solution to this 2 years ago? I'm having the same problem...

TR’s picture

Status: Active » Postponed (maintainer needs more info)

@jeepster: If you can provide steps to reproduce the problem we can take a look at it. Ubercart does not set the page encoding - that is done by the theme.

jeepster’s picture

Hi @TR,

I'm in /admin/store/orders/view section. From there, if I want to print one single invoice I click on the printer Icon and I get the invoice correctly themed (uc-order--customer.tpl in my main theme).

Now, if I select one or more invoices in the view (where I installed VBO) and in operations I select Print Invoice, I get a document of invoices well themed (uc-order--customer.tpl in my admin theme) but full of strange characters (ex. "€ " instead "€").

Finally, If I see the same invoices by going to /admin/store/orders/*/invoice, the invoice is correctly shown using the uc-order--customer.tpl in my admin theme (the same file I used for the bulk printing).

So I don't know where the page encoding is lost...

Any ideas?

TR’s picture

Just enabling VBO isn't enough - you have to modify the View itself to make VBO work on that View. I don't know how you've modified the View, and without knowing what you've done I can't look into the problem.

jeepster’s picture

Hi TR,

I know that, the VBO is installed in Drupal and working in the view. My problem is not making work VBO. My problem is that when I print invoices with the bulk method the text have strange characters, exactly the same problem Onein had 2 years ago. I have to say that this feature was working perfectly in an old server and it started to print these strange characters when I changed the server provider...

Thank you for you interest