Multi-Language Support for EZ-Pages
In response to a question in the 'Customization from the Admin' forum, I found some time and played with some code...there is a zip file attached to this post that contains a complete drop-in contribution to make the EZ-Pages fully multi-language capable just as the category and product titles and descriptions are.
There are installation instructions included in the readme.txt file
Note: this contribution is designed for v1.3.0+ only. If you want to try it on an earlier version of the cart, feel free to do so at your own risk but don't expect support for it.
USE THIS LINK TO DOWNLOAD: http://www.zen-cart.com/index.php?ma...roducts_id=113
MODERATOR NOTE:THE FILE ATTACHED HERE CONTAINS SOME BUGS. You should download using the link above.
Re: Multi-Language Support for EZ-Pages
Thanks for your effords and quick response! Naturally I was hoping for a solution, but never expected it this fast ...............
Of course I tried out your solution immediately. Unfortunately I get the following error:
1146 Table 'hairsho_pmzen.zenpm_ezpages_text' doesn't exist
in:
[select count(*) as total from zenpm_ezpages e, zenpm_ezpages_text et where e.pages_id = et.pages_id and et.languages_id = '2']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
In the new SQL query the new table is defined as ezpages_content and the php file is looking for the ezpages_text. We tried to resolve this by changing the table name into ezpages_content but still (about) same error.
We will now try to ajust the SQL query now but all help is welcome of course. I will report back later.
Re: Multi-Language Support for EZ-Pages
A
We first changed the table name in the SQL query and the EZ pages panel within admin is now working again! If we now add a new EZ page a multi-langual form opens and in both English (admin panel) and Dutch the correct title from EZpage is shown.
However, the EZ pages do not show in the shop at all! The sidebox does show so the program 'knows' that there is a page, but does not provide the title/link in the sidebox.
B
New approach: adjusted the following files:
1. includes/extra_datafiles/ezpages_multilangauge_database_names.php
2. admin/includes/extra_datafiles/ezpages_multilangauge_database_names.php
In both files we made the following changes:
from: define('TABLE_EZPAGES_TEXT', DB_PREFIX . 'ezpages_text');
to: define('TABLE_EZPAGES_TEXT', DB_PREFIX . 'ezpages_content');
Same result unfortunately! The sidebox does show as soon as an EZ page has been made, but the EZ page itself does not show (no title/link in sidebox)
Re: Multi-Language Support for EZ-Pages
:blush: Sorry, we screwed up
We forgot to do the "files to over-ride" section of the README
Now that we did - together with step B from previous mail- everything works fine.
Thanks again!!:smile:
Re: Multi-Language Support for EZ-Pages
apologies for the error in the table name...the result of a last-minute change of mind about the table name.
It works fine for me on two separate installations - but if there was some original content in the ezpages table that was copied into the new table by the sql patch I provided, you need to manually add the rows for the additional languages (else you just get the word Array in place of the link). I may have to rethink the inclusion of that in the sql patch and perhaps include a php install file that will populate the new table for all installed languages (but each page will have the same title/content for each language until edited).
Re: Multi-Language Support for EZ-Pages
That may be true and I can see your point, but for us it works perfectly at the moment!
Many thanks!
Re: Multi-Language Support for EZ-Pages
Hello bunyip,
I installed the multi ez pages with the same error accoured to femky, fixed that by editing the two rows for the table names and the pages show up correctly in multi language.
However, I can't save the new (or edited) pages. Get always an error:
Page title for English is required
Page title for Greek is required
I'm running 3 languages: Eng, German, Greek
My default languge is English
Default editor: FCKEDITOR
Wonder why there is no error for the German Page title
Dimi
Re: Multi-Language Support for EZ-Pages
Pivey - deselect FCKEDITOR and use HTMLAREA or None and let me know if you still get the errors.
Re: Multi-Language Support for EZ-Pages
Yes, still the same. I tried with Htmlarea, none..the same!
Error: Page title required. (English)
Error: Page title required. (Greek)
Dimi
Re: Multi-Language Support for EZ-Pages
I think I found the problem:
in admin/ezpages.php find this line of code:
Code:
if (empty($_POST['pages_title'][$i])) {
change it to this:
Code:
if (empty($_POST['pages_title'][$languages[$i]['id']])) {