Re: Multi-Language Support for EZ-Pages
there's actually another place a couple of lines above that has the same problem.
This line of code:
Code:
if ($_POST['pages_html_text'][$i] !='' and strlen(trim($_POST['pages_html_text'][$i])) > 6) {
should be changed to this:
Code:
if ($_POST['pages_html_text'][$languages[$i]['id']] !='' and strlen(trim($_POST['pages_html_text'][$languages[$i]['id']])) > 6) {
I'll update the file in the downloads section to correct thes two lines.
Re: Multi-Language Support for EZ-Pages
:thumbsup: Perfect!
I buy you a beer when you are in Greece....and Thank You!
Dimi
Re: Multi-Language Support for EZ-Pages
Hi, I have downloaded a new version of multilanguage support and done all steps. But there is a problem that I can not get new EZ page working. the old ez pages are still there but the content disapeared? I guess something got wrong... is there a way how to solve it?
see the page: www.mozaika.org
All Ez pages which you can see there have not the pages in admin/tools/ezpages... the whole page in tools/ezpages is empty... so I can not even delete the old ezpages.. pls help..
Oldrich Svec
PS: always I run this the pages disapear from admin but they are still on main page:
DROP TABLE IF EXISTS `ezpages_content`;
CREATE TABLE IF NOT EXISTS `ezpages_content` (
`pages_id` int(11) NOT NULL default '0',
`languages_id` int(11) NOT NULL default '1',
`pages_title` varchar(64) NOT NULL default '',
`pages_html_text` text NOT NULL,
KEY `idx_ezpages_content` (`pages_id`,`languages_id`)
) TYPE=MyISAM;
#################
## This next section copies your page titles and content across from the existing ezpages table into the new ezpages_content table
#NEXT_X_ROWS_AS_ONE_COMMAND:3
INSERT INTO ezpages_content (pages_id, pages_title, pages_html_text)
SELECT pages_id, pages_title, pages_html_text
FROM ezpages;
#################
## You don't need to do this next step, it just serves to remove the now unused fields in the ezpages table.
## To run the query, remove the comment marks from each line
##ALTER TABLE `ezpages` DROP `languages_id` ,
##DROP `pages_title` ,
##DROP `pages_html_text` ;
Re: Multi-Language Support for EZ-Pages
If I go to your site and select English as the language, I see all the content for the ezpages. If I select Czech then the content is blank.
The sql tool I provided with the module takes your original content and adds it as english only in the new table. You'll need to add the Czech content separately.
From your Admin panel, try selecting English as your language, then go to Tools > Ezpages and see what is there. You should be able to add the Czech titles/content.
Re: Multi-Language Support for EZ-Pages
I see... I did so and I tried to edit one of the files but when I pressed update, it behaved normaly but when I looked in the file again all the czech content disapeared. And if I create new file and put some content in it, it saves it correctly but nothing is seen on the main page:
EZPages :: :: Shared :: Zen Cart
I am newbie in this so I am sorry if it is a trivial question.
Thank you very much for your help.
Oldrich Svec
Re: Multi-Language Support for EZ-Pages
I think I've figured out what the problem is for your Czech titles and content not being saved - I'll have a fix for that shortly.
As for the titles not being displayed on your store, I don't think you installed the mod correctly. If you extracted all of the zip file you should have had a folder includes/modules/CUSTOM/ that had two files in it. That CUSTOM folder should have been renamed to match your custom template folder name before you uploaded the files.
Re: Multi-Language Support for EZ-Pages
The failure of titles and content not being saved for additional languages was because of the way the update process was implemented.
After installing the module, you would have a datarow in TABLE_EZPAGES_TEXT for each page, but only for a single language. The update process was effectively trying to update a datarow that didn't exist for additional languages. I've now included checking for that so if the datarow doesn't exist, it gets inserted.
(This will also allow for a situation where additional languages are added to your store after this contribution is installed)
I've updated the module in the Downloads section, but it will take a little while to get processed before it's available. In the meantime, replace your copy of admin/ezpages.php with the new file from the attachment to this post.
Re: Multi-Language Support for EZ-Pages
I did above and now I have this
Parse error: parse error, unexpected T_VARIABLE, expecting '(' in /home/fwebsolu/public_html/demo001/admin/ezpages.php on line 204
lost admin altogether.
I just spent 5 days doing the french language upgrade and this would be a great addon tool.
Fantastic work.
Thanks
Peter
Re: Multi-Language Support for EZ-Pages
at line 204 of admin/ezpages.php, change this code:
Code:
if $check_query->RecordCount() > 0) {
to this
Code:
if ($check_query->RecordCount() > 0) {
Re: Multi-Language Support for EZ-Pages
Thanks
I was just poking around myself to see it there was a missing bracket.
Anyway that solves the error message. I will play with Ezpages now for a while in french and english and see if all is fine.
Again thanks for the quick response.
Peter