0

I've been searching for a way to print shipping/delivery labels for Drupal Commerce (drupal 7 kickstart). I'm amazed that there still seems to be no real solution to this but rather a series of hacks. I was sure this would be adequately covered or even be part of core! We could do this in Ubercart and yet it seems to have been overlooked in Drupal Commerce.

Anyway, we want to be able to print the labels to a label printer as we process each order from the admin screen. The closest 'solution' is this Print mailing address labels from a view. This isn't exactly ideal as we just need a button next to 'Shipping Address' which prints the label to the label printer.

Using the Themer Devel module it tells us we should be able to override commerce-order--backoffice.tpl.php where we were hoping to inject a print code and customise the print fields using the Print Module http://drupal.org/project/print but drupal refused to see our version of commerce-order--backoffice.tpl.php.

We just seem to be going around and around with this one trying idea after idea getting nowhere, very frustrating that this has been overlooked by Drupal Commerce.

Any ideas much appreciated. Chris

1

There are myriad number of ways that people want their shipping labels—some print them pre-cut sheets and other use label printers. Overall, every setup is a bit different.

Ultimately, your shipping label solution will be custom (although calling it hack is a bit much). You can use a view to create a single printable "page" (just use an argument to limit it to a single result) and then just use CSS to style it. If you're wanting to print a whole bunch of them, then leave out the argument and ensure that you're setting the proper page size and putting in your page-breaks properly.

  • Hi,Thanks for your answer. It seems that using Views in this way might do it. But as Drupal won't let me override commerce-order--backoffice.tpl.php I'm making no progress again. Any idea why I can't override this template? I have cleared the cache etc as normal but no joy. – OnCreative Mar 15 '16 at 11:28
  • It's hard to say, but I know in the past when I've had problems like that it's usually be a stray character in a file name or something causing that issue. Check your file names and, if necessary, try using devel_themer to see if there isn't another option for the file name. – nvahalik Mar 15 '16 at 13:41
  • It's not a typo as I dragged the .tpl file from the commerce folder into my theme folder. Looks like I'll have to find another way to get the button in the admin section somehow. Thanks for your help. – OnCreative Mar 15 '16 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.