Zen Cart Logo
Forums / Bug Reports / [Not a bug] language define conflict

[Not a bug] language define conflict

Locked

Views: 1,773

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
26 Aug 2008, 5:05 AM
#1
thehypo avatar

thehypo

Zen Follower

Join Date:
Jan 2006
Posts:
109
Plugin Contributions:
0

[Not a bug] language define conflict

The Admin page modules.php has a Switch which, depending on whether you select the Payment, Shipping, etc. modules, the php sets:
define('HEADING_TITLE', HEADING_TITLE_MODULES_SHIPPING); - or whatever title is relevant.

However, while an "echo HEADING_TITLE;" right after that line causes the proper title to appear on the page, the actual header spot is incorrect if you have any Extra language definitions which include a define('HEADER_TITLE'...) in them. Right now my Shipping Module/etc. pages have a header title of "Email Address Export for Newsletters".

IF I delete that extra language file, I end up with "E-mail Archive Manager", etc. for every extra language file with that define in it.

I'm not sure why this occurs, but that's the only page I've noticed it on so far. I assume it has to do with the HEADER_TITLE being defined in the module.php file, rather than a separate langage file like most other Admin pages, but I'm not sure why, after it is defined in the header (and my echo properly shows the right title), it then resets to the external definition in the body.

27 Aug 2008, 1:07 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Not a bug] language define conflict

That's not a bug. That's just the way things work.
If you don't want things to load out of order, put your language files in the appropriate folders ... noting that the extra_definitions folder's files all get loaded, hence impacting the order.

.
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.

27 Aug 2008, 11:42 PM
#3
thehypo avatar

thehypo

Zen Follower

Join Date:
Jan 2006
Posts:
109
Plugin Contributions:
0

Re: [Not a bug] language define conflict

So you're saying that extra_definitions is not where definitions for extra pages should go? (bearing in mind that I just put the files where the add-ons/plugins had them).

Is this different than extra_configures, extra_datafiles, extra_functions, and extra_boxes? Or should those files be somewhere else as well? Thanks

27 Aug 2008, 11:52 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Not a bug] language define conflict

If you're referring to the Email Address Exporter mod, it doesn't tell you to put anything into an "extra_definitions" folder. The language file for that mod goes directly into the language folder, exactly as it's included in the zip.

.
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.

28 Aug 2008, 6:34 AM
#5
thehypo avatar

thehypo

Zen Follower

Join Date:
Jan 2006
Posts:
109
Plugin Contributions:
0

Re: [Not a bug] language define conflict

I appologize for my own error. I guess when I installed these plugins, having seen so many other plugins put files in that folder (legitimately, I assume? I'm not sure), I got into the assumption that the folder was simply there for organization purposes (as a place for add-on files to keep them separate from core files), such as the custom template folders on the front-end side. I must have thus put a those three languages files (as it turns out, only three) in that folder, assuming the designer of the plugin simply chose not to use the folder for organization.

My bad, thanks for taking the time to clear up my mistake :)