After reading a number of sources, it seems best to skip if only 1 language, or display for all languages if more than 1.
So, proposing this: https://github.com/zencart/zencart/pull/1314
After reading a number of sources, it seems best to skip if only 1 language, or display for all languages if more than 1.
So, proposing this: https://github.com/zencart/zencart/pull/1314
.
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.
Hi,
I have implemented the mod proposed so the html_header section becomes
But I get a blank page and the following error logPHP Code:
// BOF hreflang for multilingual sites
if (isset($language_list) || $language_list = $lng->get_available_languages() && sizeof($language_list) > 1) {
foreach($language_list as $key=>$value) {
echo ' <link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $value['code'], $request_type) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $value['code']) . '" hreflang="' . $value['code'] . '" />' . "\n";
}
}
// EOF hreflang for multilingual sites
PHP Fatal error: Call to a member function get_available_languages() on a non-object in /home2/xxxxx/public_html/includes/templates/responsive_classic/common/html_header.php on line 71
I have noticed that in github the file lines to modified start with 48 while in my file the lines wereis starts at 73.PHP Code:
// BOF hreflang for multilingual sites
I would like to understand this.
Thanks.
Happy New Year from Italy
enzo
Last edited by enzo-ita; 1 Jan 2017 at 07:55 PM.
.
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.
Is the code in html_header already corrected in 1.55e (I copied the code from zen-cart 1.55e) or should I still apply the fix described in this forum ( I have 3 languages installed)?
Bookmarks