Skip to Content Skip to Menu

[SOLVED] Invoice logo not showing when checking from basket

10 years 2 months ago - 10 years 2 months ago #247671 by MacPhotoBiker
Hi,

I set up the CBSubs invoice so the logo shows language dependent (different logo for French and English). When a user logs into the profile and checks the invoice, logos show properly.

However, when the admin logs into the "Basket" and chooses "View invoice", the logo does not show (only the generic "broken image" is displayed).

Is there a way I could fix this?

Thanks!
Last edit: 10 years 2 months ago by MacPhotoBiker. Reason: Solved

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
10 years 2 months ago #247759 by krileon
Translations are always in the language of the viewing user. My guess is there is no image for the language the admin is using. You'll need to right click and click Inspect Element on the image in Chrome or Firefox and review the "src" of the image element to see if it's pointing to the correct file.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: MacPhotoBiker

Please Log in or Create an account to join the conversation.

10 years 2 months ago #247796 by MacPhotoBiker
Replied by MacPhotoBiker on topic Invoice logo not showing when checking from basket
Indeed, I had not set the link in the admin language file. But I did this now, deleted the cache, logged out an in, and reloaded the browser.

In the user invoice (where the logo shows properly), this is the generated link:

<img src="/images/afam_logo_en_486_462.png" alt="afam logo en 486 462" width="150" height="143">

From the backend, when I click on "View invoice", the generated language dependent link is identical:

<img src="images/afam_logo_en_486_462.png" alt="afam logo en 486 462" width="150" height="143">

But still, the logo does not show, only the "broken image".

Please Log in or Create an account to join the conversation.

10 years 2 months ago #247799 by MacPhotoBiker
Replied by MacPhotoBiker on topic Invoice logo not showing when checking from basket
Sorry, my bad, I just noticed that I missed a leading /.

Language dependent logos show perfectly fine now.

Merci!

Please Log in or Create an account to join the conversation.

10 years 2 months ago #247800 by MacPhotoBiker
Replied by MacPhotoBiker on topic Invoice logo not showing when checking from basket
Just one more little comment. The "problem" was that in "language.php" the link to the language dependent image does not need a leading /, while in "admin_language.php" one has to add the slash.

Not a big deal, but these little things can be quite annoying, so I put the comment here in case somebody stumbles across that post in future.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
10 years 2 months ago #247838 by krileon
Ah, your issue is you're using relative links. You need to provide an absolute link to your image for it to work no matter the location. Example as follows.

FROM:
Code:
<img src="/images/afam_logo_en_486_462.png" alt="afam logo en 486 462" width="150" height="143">
TO:
Code:
<img src="//example.com/images/afam_logo_en_486_462.png" alt="afam logo en 486 462" width="150" height="143">

Note I've excluded "http:" as it allows the image to load in HTTP and HTTPS safely.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum