Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2010
    Posts
    25
    Plugin Contributions
    0

    Default Sales report with graphs - non-english characters encoded

    the ø ø is on the bottom, the å å is on the top line
    Attached Images Attached Images  
    Last edited by jarlee; 14 Oct 2020 at 09:38 AM. Reason: Wrong location for the norwegian characters

  2. #2
    Join Date
    Aug 2010
    Posts
    25
    Plugin Contributions
    0

    Default Re: Sales report with graphs

    Something went wrong editing the original post, but nevertheless, I found it back, and here it is. This might be important to all foreign language Zencarts out there, so I think I am not alone here.

    After installing Norwegian language to Zen Cart v1.5.7, and trying to get all translations corrected, the Sales Report with Graphs won't show the translated HTML for typical Norwegian language (like ø or å) inside the graphic left side part of the page. The report text will show in the language choosen, but the left side is a graph, and the header and the description of the color bars will still have encoded HTML text. A picture:
    Name: Screenshot_2020-10-13 AS Båtlys.jpg Views: 1 Size: 20.1 KB
    The character on top should be an 'å', the one down should read 'ø'. I tried to find the location which produces the text inside the graph, but it might be better to get some help here.
    I found a location in stats_sales_report_graphs.php, where I changed line 147 to:
    Code:
                 'title': '<?php echo html_entity_decode($report_desc); ?>',
    which took care of the topline being presented as normal readable text, but I cannot find the line to change the bottom text (legend). Also: just tell me if this is not the correct way, any help would be appreciated.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,627
    Plugin Contributions
    123

    Default Re: Sales report with graphs

    I wonder if this is just line 101

    echo CHART_AVERAGE_SALE_AMOUNT;

    that needs to be changed as you have done in the prior case.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Aug 2010
    Posts
    25
    Plugin Contributions
    0

    Default Re: Sales report with graphs

    Quote Originally Posted by swguy View Post
    I wonder if this is just line 101

    echo CHART_AVERAGE_SALE_AMOUNT;

    that needs to be changed as you have done in the prior case.
    Indeed, and line 99 which should be changed to:
    Code:
              data.addColumn('number', '<?php echo html_entity_decode(CHART_TOTAL_SALES); ?>');
    That will produce correct translation, dunno why Google Charts acts this way, but the result is looking great again. Tx for the input

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sales report with graphs

    I wonder if the dashboard widget might also benefit from the same in case some of the labels are defined with encoded characters?

    I've incorporated the changes you discussed above, here: https://github.com/zencart/zencart/pull/4025/files
    along with the added lines for the widget.

    Thoughts?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2010
    Posts
    25
    Plugin Contributions
    0

    Default Re: Sales report with graphs

    Thanks for picking this up :) I think it will help a few of us foreigners to get the translations done for 1.5.7.

    I have not seen any other issues with translation regarding foreign characters. It seems this is related to Google Charts being part of the sales graphs. I guess this means it needs some more testing, once the website is finalized.

 

 

Similar Threads

  1. Replies: 8
    Last Post: 1 Nov 2019, 06:15 PM
  2. v151 Sales Report with Graphs support thread
    By JacobBushnell in forum Addon Admin Tools
    Replies: 17
    Last Post: 25 Jul 2019, 02:27 PM
  3. Wrong non-english characters in names/addresses when using paypal express
    By tj1 in forum PayPal Express Checkout support
    Replies: 25
    Last Post: 14 Jul 2010, 05:08 AM
  4. Sales report with graphs
    By paulm in forum All Other Contributions/Addons
    Replies: 22
    Last Post: 9 Jun 2010, 08:52 PM
  5. Replies: 0
    Last Post: 28 Aug 2009, 07:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR