13 replies [Last post]
Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1434
Was this information Helpful?

Noticed that there is a hard coded solution for changing out the logo used in the customer invoice. http://www.ubercart.org/comment/5990/Hi As a future feature, could this be implemented in a way that would allow uploading a separate logo for the cart and a different logo for the customer invoice? Perhaps as part of this page: admin/build/themes/settings/aurora in place of making a hard coding edit.

The overall reason is that a logo on the cart may not look good on the invoice as each graphic has to be treated differently depending on the color of the background, size, etc.

Jim

JonW's picture
Offline
Joined: 12/05/2007
Juice: 94
Good idea.

I think a separate logo for the invoice is good. We try use only black and white to save toner on the invoice printing, and the website logo is in color, so having two would be a good idea.
Although I would expect to see it less as a theme thing, and more as a store setting in this section.../admin/store/settings/store

Anywhere you put it would be great...

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1434
Logo

John:

It is easy to change in the customer.itpl.php template. But as you have indicated, placing it in a store setting would be a good idea. Perhaps it is under consideration by the Uber folks.

Jim

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Logo

I won't be adding it personally, preferring the invoice template fix as the quicker fix for now. I'd be happy to accept a patch that handles the upload and makes some sort of token available for it.

lgammo's picture
Offline
Joined: 04/19/2008
Juice: 8
Site Logo vs Invoice Logo: contributed ubercart module.

Hello,

For fun, I made a small module for ubercart (to be placed in the contrib directory) that allows you to upload a graphic and defines a token to reference that graphic: [site-invoice-logo].

In order to use this new logo, you need to have a new template customer.itpl.php.

I really do not like having the templates inside the ubercart module sources. Is there a plan to separate them from the code?

Anyway, if anyone is interested in this invoice logo module, I can upload it to ubercart site.

Enjoy.

lgammo

descott's picture
Offline
Joined: 05/27/2008
Juice: 50
Re: Site Logo vs Invoice Logo: contributed ubercart module.

Could you perhaps post a link to your module?

Thx

lgammo's picture
Offline
Joined: 04/19/2008
Juice: 8
Site logo upload module...

I am attaching the module to this posting. Any comments and changes to the coding style, names are appreciated.

Enjoy...
lgammo

AttachmentSize
customize_uc_store.tar.gz 7.27 KB
descott's picture
Offline
Joined: 05/27/2008
Juice: 50
Thank you Igammo: Needed to

Thank you Igammo:

Needed to make some slight changes

  function theme_logo_img($img_fileinfo) {
    if ($img_fileinfo != NULL) {
      $img_filename = $base_path . $img_fileinfo->filepath;
      return "<img src=\"$img_filename\" />";
    } else {
      return "";
    }
  }

  function customize_uc_store_token_values($type, $object = NULL, $options = array()) {
    if ($type == 'order') {
      $tokens['site-invoice-logo'] = theme_logo_img(variable_get(LOGO_FILE_VAR, NULL));
      return $tokens;
    }
  }

in order to make it work. Noticed the token still was referencing your local icon.

lgammo's picture
Offline
Joined: 04/19/2008
Juice: 8
Site Logo vs Invoice Logo

Needed to make some slight changes to make it work on my setup (localhost):

function theme_logo_img($img_fileinfo) {
if ($img_fileinfo != NULL) {
$img_filename = file_create_url($img_fileinfo->filepath);
return "";
} else {
return "";
}
}

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Site Logo vs Invoice Logo: contributed ubercart module.

Re: your question, there was a plan to get these moved into the theme directory, but it didn't materialize in time for 1.0. This is definitely the plan for 2.0, though. Sorry for any hassle it causes until then. Sad

Bruiseviolet's picture
Offline
Joined: 10/22/2010
Juice: 232
Re: Re: Site Logo vs Invoice Logo: contributed ubercart module.

It's not a problem, just a bit more work for everyone =) I am in the same boat as a few others- the site header on one of the sites I am currently working on, is dark- so the image text is white- which doesn't show up in the invoice emails. I am applying the patch so I can have it point to the dark text/smaller size version of their logo for the invoice.

Mom. Entrepreneur. Awesome. www.frequencyapps.com

plasticlax's picture
Offline
Joined: 10/22/2008
Juice: 45
drupal's print module

it would be nice if this could somehow be handled by drupal's printer friendly pages module ( http://drupal.org/project/print ), which has a method for uploading a print logo, but i really like the print logo token idea. if there is no print logo, will the default logo be used instead, or no logo shown?

also attached is the module with descott's changes, but i actually had to add a leading slash to get get things to work:

function theme_logo_img($img_fileinfo) {
    if ($img_fileinfo != NULL) {
      $img_filename = $base_path . $img_fileinfo->filepath;
      return "<img src=\"/$img_filename\" />";
    } else {
      return "";
    }
  }
AttachmentSize
customize_uc_store.zip 7.58 KB
make-online-shop's picture
Offline
Joined: 01/01/2011
Juice: 514
Anyway easy way to hide or change the logo in confirmation mail

Anyway easy way to hide or change the logo in customers confirmation Emails now ?

Thanks.

jakesmith's picture
Offline
Joined: 11/06/2014
Juice: 3
Re: Site Logo vs Invoice Logo

Not a big deal for many but this really need a fix for business matter. And besides, that logo determines not only the quality of services being offered but also the entire agenda of the business that runs the invoicing protocols.