Post by jfnewell1965 » Wed Mar 13, 2019 2:14 pm

Using OpenCart 3.0.3.1

When you go to the "Gift Certificate" page to buy a gift certificate, the header displayed is "Account".

voucher.twig seems to be calling the data

Code: Select all

<h1>{{ heading_title }}</h1>
from the catalog - language - en-gb - account - voucher.php file (assuming this is the right file):

Code: Select all

$_['heading_title']    = 'Purchase a Gift Certificate';
But what seems to get displayed from the catalog - language - en-gb - account - voucher.php file is (assuming this is the right file):

Code: Select all

$_['text_account']     = 'Account';
Any ideas on what is up? Why is "text_account" getting displayed when "heading_title" is being called?

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by paulfeakins » Thu Mar 14, 2019 8:32 pm

jfnewell1965 wrote:
Wed Mar 13, 2019 2:14 pm
Any ideas on what is up? Why is "text_account" getting displayed when "heading_title" is being called?
There are a few places where the wrong titles show in 3.0.3.1, you should be able to correct it in the language files?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by jfnewell1965 » Thu Mar 14, 2019 11:09 pm

I am thinking something else is wrong.....and, I a sorry this is so long...I don't know how to fully describe it in a shorter way.

The voucher.twig page is pulling the following for this line:

Code: Select all

<h1>{{ heading_title }}</h1>
However, the heading_title in the voucher.php language file is

Code: Select all

$_['heading_title']    = 'Purchase a Gift Certificate';
But that is not showing up. What is showing up is "Account"

I didn't really track this any further, however I did find that the definition "$_['heading_title'] = 'Account';" appears in the following language files:
- catalog\language\en-gb\extension\module\account.php
- admin\language\en-gb\extension\module\account.php
- catalog\language\en-gb\account\download.php
- catalog\language\en-gb\account\login.php
- catalog\language\en-gb\account\logout.php
I guess I could go in and change each definition until I find the right one, but since pulling from any of those files is the wrong solution, I did the following...

I changed "heading_title" to "text_voucher" which should give "Gift Certificate" from the voucher.php language file.

Code: Select all

<h1>{{ text_voucher }}</h1>
But what showed up was "Gift Certificates" rather than "Gift Certificate" (the "s" on the end).

The only place that "$_['text_voucher'] = 'Gift Certificates';" is defined is in the footer.php language file.

So I went into the footer.php language file, changed "Gift Certificates" to "Gift Certificates Test" and reloaded my page, and what showed up now was "Gift Certificates Test". (of course "Gift Certificates Test" now also shows up in the footer)

So, I think the voucher.twig file is at least in part pulling info from the footer.php language file rather than the voucher.php language file.

So, is it a bug? Did I win a million dollar finders fee!? Or, at least, do you have any ideas how to fix it?
Last edited by jfnewell1965 on Fri Mar 15, 2019 5:42 pm, edited 2 times in total.

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by jfnewell1965 » Fri Mar 15, 2019 3:38 am

So...a little more testing....I renamed "text_voucher" in the voucher.php language file to "text_vouchergc"....I figured having the same name (variable?) across multiple language files was screwing things up.....with that changed, I changed the voucher.twig call to "<h1>{{ text_vouchergc }}</h1>....reloaded/refreshed/cleared cache/etc....and guess what, it worked (kind of).....it pulled the "text_vouchergc" text from the voucher.php language file and displayed the correct text...

EXCEPT.....

The breadcrumb screws up when you do that, because the breadcrumb routine is pulling the originally named "text_voucher" properly from the voucher.php language file....so renaming "text_voucher" fixes one issue, and creates another.

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by jfnewell1965 » Fri Mar 15, 2019 3:58 am

So this is not fixed, but this is my workaround....

Since the voucher.twig breadcrumb routine likes the variable? "{{ text_voucher }}" in the voucher.php language file, and the voucher.twig <h1> call does not, I just made an additional variable. The breadcrumb routine looks for "{{ text_voucher }}" variable?, and the header call <h1> looks for the newly created
"{{ text_vouchergc }}" variable.

It does not fix anything, but it solves the page display issue.

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by straightlight » Fri Mar 15, 2019 5:53 am

This issue should be looked on GitHub Opencart if you notice the same original variables prior to what you have posted above.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jfnewell1965 » Fri Mar 15, 2019 10:05 am

straightlight .... I have an untouched install of OpenCart 3.0.3.1, so let me do some research.

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by cyclops12 » Fri Mar 15, 2019 6:34 pm

This seems to be a problem in all 3 versions where if you have a module assigned to the page via layouts then the heading-title is taken from the module rather than the actual page title

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by jfnewell1965 » Fri Mar 15, 2019 6:55 pm

cyclops12 .... I don't know enough about OpenCart to even proclaim myself a newbie, but....

The issue I had in this thread was all on the "Gift Certificate" page with no additional modules added, a stock unaltered page.

(unless you count the "MegaMenu" extension that I loaded on my site)

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by cyclops12 » Fri Mar 15, 2019 10:52 pm

Yes the same in default 3031 version on the gift certificate page, on the right hand side is the account module, loaded by default and this will then pull up the heading title of the module instead of the gift page.

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by cyclops12 » Fri Mar 15, 2019 11:43 pm

Knew i had seen it somewhere..... ;D
Finally the solution...
viewtopic.php?f=202&t=188441&p=723217#p686930

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by jfnewell1965 » Sat Mar 16, 2019 12:27 am

You were correct....I was so focused on the gift certificate part, my mind just ignored the stuff to the right!

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by jfnewell1965 » Sat Mar 16, 2019 12:37 am

cyclops12 ... That did it! Good Memory!

Made the changes, and "Gift Certificate" showed up.
Just to test (the skeptic in me) I went into the voucher language file added "Test" to variable to make sure it was pulling from there, and it did.

So, I have reversed my "work around" changes, and I am going with this solution.

Thanks.

New member

Posts

Joined
Sat Dec 01, 2018 10:19 pm

Post by cyclops12 » Sat Mar 16, 2019 12:51 am

Happy to help
Only 7300 problems left now then lol
Good luck 😁

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by straightlight » Sat Mar 16, 2019 4:21 am

Issue already fixed on GitHub.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Sat Mar 16, 2019 4:32 am

straightlight wrote:
Sat Mar 16, 2019 4:21 am
Issue already fixed on GitHub.
This may be so BUT 2 things.....
1) alot of people do not know how to navigate through github to find answers and
2) why is it not in the 3031 download ?

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by straightlight » Sat Mar 16, 2019 4:39 am

cyclops12 wrote:
Sat Mar 16, 2019 4:32 am
straightlight wrote:
Sat Mar 16, 2019 4:21 am
Issue already fixed on GitHub.
This may be so BUT 2 things.....
1) alot of people do not know how to navigate through github to find answers and
2) why is it not in the 3031 download ?
1) Nothing prevents them on either using Google or posting on the forum by creating new service requests
2) I've already discussed this with Daniel on GitHub in the past. It seem that two separate bunch of sleepy hollows people in the OC team works on the package and distributes the change without (or not as much) involving bug fixes as compared to the GitHub version.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Sat Mar 16, 2019 4:42 am

ok thanks
was just asking, no offence to you ;D

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by straightlight » Sat Mar 16, 2019 4:44 am

No problem. I have now addressed this persistent issue on GitHub: https://github.com/opencart/opencart/issues/7271

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Sat Mar 16, 2019 4:54 am

Thanks, hope the powers that be will sort it out soon ;D

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 160 guests